Home
last modified time | relevance | path

Searched refs:Ready (Results 1 – 25 of 444) sorted by relevance

12345678910>>...18

/external/rust/crates/tokio/src/io/driver/
Dready.rs16 pub struct Ready(usize); struct
18 impl Ready { implementation
20 pub const EMPTY: Ready = Ready(0);
23 pub const READABLE: Ready = Ready(READABLE);
26 pub const WRITABLE: Ready = Ready(WRITABLE);
29 pub const READ_CLOSED: Ready = Ready(READ_CLOSED);
32 pub const WRITE_CLOSED: Ready = Ready(WRITE_CLOSED);
35 pub const ALL: Ready = Ready(READABLE | WRITABLE | READ_CLOSED | WRITE_CLOSED);
38 pub(crate) fn from_mio(event: &mio::event::Event) -> Ready { in from_mio() argument
39 let mut ready = Ready::EMPTY; in from_mio()
[all …]
Dplatform.rs6 use mio::Ready;
8 pub(crate) fn hup() -> Ready { in hup()
12 pub(crate) fn is_hup(ready: Ready) -> bool { in is_hup()
16 pub(crate) fn error() -> Ready { in error()
20 pub(crate) fn is_error(ready: Ready) -> bool { in is_error()
27 use mio::Ready;
29 pub(crate) fn hup() -> Ready { in hup()
30 Ready::empty() in hup()
33 pub(crate) fn is_hup(_: Ready) -> bool { in is_hup()
37 pub(crate) fn error() -> Ready { in error()
[all …]
Dscheduled_io.rs1 use super::{Interest, Ready, ReadyEvent, Tick};
132 self.wake0(Ready::ALL, true) in shutdown()
155 f: impl Fn(Ready) -> Ready, in set_readiness() argument
172 let current_readiness = Ready::from_usize(current); in set_readiness()
210 pub(super) fn wake(&self, ready: Ready) { in wake() argument
214 fn wake0(&self, ready: Ready, shutdown: bool) { in wake0() argument
286 ready: interest.mask() & Ready::from_usize(READINESS.unpack(curr)), in ready_event()
302 let ready = direction.mask() & Ready::from_usize(READINESS.unpack(curr)); in poll_readiness()
328 let ready = direction.mask() & Ready::from_usize(READINESS.unpack(curr)); in poll_readiness()
330 Poll::Ready(ReadyEvent { in poll_readiness()
[all …]
Dinterest.rs3 use crate::io::driver::Ready;
83 pub(super) fn mask(self) -> Ready { in mask() argument
85 Interest::READABLE => Ready::READABLE | Ready::READ_CLOSED, in mask()
86 Interest::WRITABLE => Ready::WRITABLE | Ready::WRITE_CLOSED, in mask()
87 _ => Ready::EMPTY, in mask()
/external/rust/crates/futures-util/src/future/
Dready.rs9 pub struct Ready<T>(Option<T>); struct
11 impl<T> Ready<T> { impl
19 impl<T> Unpin for Ready<T> {} implementation
21 impl<T> FusedFuture for Ready<T> { implementation
27 impl<T> Future for Ready<T> { implementation
32 Poll::Ready(self.0.take().expect("Ready polled after completion")) in poll()
48 pub fn ready<T>(t: T) -> Ready<T> { in ready()
49 assert_future::<T, _>(Ready(Some(t))) in ready()
64 pub fn ok<T, E>(t: T) -> Ready<Result<T, E>> { in ok()
65 Ready(Some(Ok(t))) in ok()
[all …]
Dtry_select.rs71 Poll::Ready(Err(x)) => Poll::Ready(Err(Either::Left((x, b)))), in poll()
72 Poll::Ready(Ok(x)) => Poll::Ready(Ok(Either::Left((x, b)))), in poll()
74 Poll::Ready(Err(x)) => Poll::Ready(Err(Either::Right((x, a)))), in poll()
75 Poll::Ready(Ok(x)) => Poll::Ready(Ok(Either::Right((x, a)))), in poll()
/external/rust/crates/futures-util/src/stream/try_stream/
Dinto_async_read.rs32 Ready { chunk: T, chunk_start: usize }, enumerator
62 ReadState::Ready { chunk, chunk_start } => { in poll_read()
75 return Poll::Ready(Ok(len)); in poll_read()
81 self.state = ReadState::Ready { in poll_read()
89 return Poll::Ready(Err(err)); in poll_read()
93 return Poll::Ready(Ok(0)); in poll_read()
98 return Poll::Ready(Ok(0)); in poll_read()
146 self.state = ReadState::Ready { in poll_fill_buf()
154 return Poll::Ready(Err(err)); in poll_fill_buf()
158 return Poll::Ready(Ok(&[])); in poll_fill_buf()
[all …]
Dtry_for_each_concurrent.rs81 None => Poll::Ready(None), in poll()
85 Poll::Ready(Some(Ok(elem))) => { in poll()
89 Poll::Ready(None) => { in poll()
94 Poll::Ready(Some(Err(e))) => { in poll()
99 return Poll::Ready(Err(e)); in poll()
109 Poll::Ready(Some(Ok(()))) => made_progress_this_iter = true, in poll()
110 Poll::Ready(None) => { in poll()
112 return Poll::Ready(Ok(())) in poll()
116 Poll::Ready(Some(Err(e))) => { in poll()
121 return Poll::Ready(Err(e)); in poll()
/external/rust/crates/tokio/src/io/util/
Dwrite_int.rs54 return Poll::Ready(Ok(()));
64 Poll::Ready(Err(e)) => return Poll::Ready(Err(e.into())),
65 Poll::Ready(Ok(0)) => {
66 return Poll::Ready(Err(io::ErrorKind::WriteZero.into()));
68 Poll::Ready(Ok(n)) => n as u8,
71 Poll::Ready(Ok(()))
115 Poll::Ready(Err(e)) => Poll::Ready(Err(e.into())),
116 Poll::Ready(Ok(0)) => Poll::Ready(Err(io::ErrorKind::WriteZero.into())),
117 Poll::Ready(Ok(1)) => Poll::Ready(Ok(())),
118 Poll::Ready(Ok(_)) => unreachable!(),
Dread_int.rs53 return Poll::Ready(Ok(Buf::$reader(&mut &me.buf[..])));
61 Poll::Ready(Err(e)) => return Poll::Ready(Err(e.into())),
62 Poll::Ready(Ok(())) => {
65 return Poll::Ready(Err(UnexpectedEof.into()));
75 Poll::Ready(Ok(num))
118 Poll::Ready(Err(e)) => Poll::Ready(Err(e.into())),
119 Poll::Ready(Ok(())) => {
121 return Poll::Ready(Err(UnexpectedEof.into()));
124 Poll::Ready(Ok(buf.filled()[0] as $ty))
Dread_to_end.rs48 Err(err) => return Poll::Ready(Err(err)), in read_to_end_internal()
49 Ok(0) => return Poll::Ready(Ok(mem::replace(num_read, 0))), in read_to_end_internal()
93 Poll::Ready(Err(err)) => { in poll_read_to_end()
95 Poll::Ready(Err(err)) in poll_read_to_end()
97 Poll::Ready(Ok(())) => Poll::Ready(Ok(n)), in poll_read_to_end()
/external/rust/crates/tokio/src/io/
Dasync_write.rs262 Poll::Ready(Ok(buf.len())) in poll_write()
270 Poll::Ready(io::Write::write_vectored(&mut *self, bufs)) in poll_write_vectored()
278 Poll::Ready(Ok(())) in poll_flush()
282 Poll::Ready(Ok(())) in poll_shutdown()
292 Poll::Ready(io::Write::write(&mut *self, buf)) in poll_write()
300 Poll::Ready(io::Write::write_vectored(&mut *self, bufs)) in poll_write_vectored()
308 Poll::Ready(io::Write::flush(&mut *self)) in poll_flush()
322 Poll::Ready(io::Write::write(&mut *self, buf)) in poll_write()
330 Poll::Ready(io::Write::write_vectored(&mut *self, bufs)) in poll_write_vectored()
338 Poll::Ready(io::Write::flush(&mut *self)) in poll_flush()
[all …]
/external/rust/crates/futures/tests/
Dio_cursor.rs11 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[1, 2]), Poll::Ready(Ok(2))); in cursor_asyncwrite_vec()
12 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[3, 4]), Poll::Ready(Ok(2))); in cursor_asyncwrite_vec()
13 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[5, 6]), Poll::Ready(Ok(2))); in cursor_asyncwrite_vec()
14 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[6, 7]), Poll::Ready(Ok(2))); in cursor_asyncwrite_vec()
29 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[1, 2]), Poll::Ready(Ok(2))); in cursor_asyncwrite_box()
30 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[3, 4]), Poll::Ready(Ok(2))); in cursor_asyncwrite_box()
31 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[5, 6]), Poll::Ready(Ok(1))); in cursor_asyncwrite_box()
32 assert_matches!(Pin::new(&mut cursor).poll_write(cx, &[6, 7]), Poll::Ready(Ok(0))); in cursor_asyncwrite_box()
Dready_queue.rs30 assert_eq!(Poll::Ready(Some(Ok("hello"))), queue.poll_next_unpin(cx)); in basic_usage()
36 assert_eq!(Poll::Ready(Some(Ok("world"))), queue.poll_next_unpin(cx)); in basic_usage()
37 assert_eq!(Poll::Ready(Some(Ok("world2"))), queue.poll_next_unpin(cx)); in basic_usage()
38 assert_eq!(Poll::Ready(None), queue.poll_next_unpin(cx)); in basic_usage()
64 assert_eq!(Poll::Ready(Some(Err(oneshot::Canceled))), queue.poll_next_unpin(cx)); in resolving_errors()
70 assert_eq!(Poll::Ready(Some(Err(oneshot::Canceled))), queue.poll_next_unpin(cx)); in resolving_errors()
71 assert_eq!(Poll::Ready(Some(Ok("world2"))), queue.poll_next_unpin(cx)); in resolving_errors()
72 assert_eq!(Poll::Ready(None), queue.poll_next_unpin(cx)); in resolving_errors()
173 assert_eq!(Poll::Ready(None), queue.poll_next_unpin(cx)); in panicking_future_dropped()
/external/rust/crates/tokio/src/future/
Dready.rs11 pub struct Ready<T>(Option<T>); struct
13 impl<T> Unpin for Ready<T> {} implementation
15 impl<T> Future for Ready<T> { implementation
20 Poll::Ready(self.0.take().unwrap()) in poll()
25 pub(crate) fn ok<T, E>(t: T) -> Ready<Result<T, E>> { in ok()
26 Ready(Some(Ok(t))) in ok()
/external/ruy/ruy/
Dthread_pool.cc38 Ready, // Is not working, has not yet received new work to do. enumerator
69 RUY_DCHECK_EQ(new_state, State::Ready); in ChangeState()
71 case State::Ready: in ChangeState()
76 RUY_DCHECK(new_state == State::Ready || in ChangeState()
83 case State::Ready: in ChangeState()
100 if (new_state == State::Ready) { in ChangeState()
114 ChangeState(State::Ready); in ThreadFuncImpl()
122 return state_.load(std::memory_order_acquire) != State::Ready; in ThreadFuncImpl()
132 ChangeState(State::Ready); in ThreadFuncImpl()
/external/rust/crates/futures-util/src/compat/
Dcompat01as03.rs152 Async01::Ready(t) => task03::Poll::Ready(Ok(t)), in poll_01_to_03()
176 Async01::Ready(Some(t)) => task03::Poll::Ready(Some(Ok(t))), in poll_next()
177 Async01::Ready(None) => task03::Poll::Ready(None), in poll_next()
245 Async01::Ready(Some(t)) => task03::Poll::Ready(Some(Ok(t))), in poll_next()
246 Async01::Ready(None) => task03::Poll::Ready(None), in poll_next()
274 AsyncSink01::Ready => task03::Poll::Ready(Ok(())), in poll_ready()
280 None => task03::Poll::Ready(Ok(())), in poll_ready()
291 AsyncSink01::Ready => f.poll_complete().map(|i| (i, None)), in poll_flush()
298 (Async01::Ready(_), _) => task03::Poll::Ready(Ok(())), in poll_flush()
330 (Async01::Ready(_), _, _) => task03::Poll::Ready(Ok(())), in poll_close()
/external/rust/crates/futures-channel/src/mpsc/
Dsink_impl.rs28 Poll::Ready(Err(ref e)) if e.is_disconnected() => { in poll_flush()
30 Poll::Ready(Ok(())) in poll_flush()
41 Poll::Ready(Ok(())) in poll_close()
66 Poll::Ready(Ok(())) in poll_flush()
74 Poll::Ready(Ok(())) in poll_close()
97 Poll::Ready(Ok(())) in poll_flush()
105 Poll::Ready(Ok(())) in poll_close()
/external/rust/crates/tokio-stream/src/stream_ext/
Dmerge.rs74 Ready(Some(val)) => return Ready(Some(val)), in poll_next()
75 Ready(None) => {} in poll_next()
80 Ready(Some(val)) => return Ready(Some(val)), in poll_next()
81 Ready(None) => {} in poll_next()
86 Ready(None) in poll_next()
/external/rust/crates/futures-util/src/io/
Dfill_buf.rs34 Poll::Ready(Ok(_)) => match Pin::new(reader).poll_fill_buf(cx) { in poll()
35 Poll::Ready(Ok(slice)) => Poll::Ready(Ok(slice)), in poll()
36 Poll::Ready(Err(err)) => { in poll()
43 Poll::Ready(Err(err)) => Poll::Ready(Err(err)), in poll()
Dcursor.rs159 Poll::Ready(io::Seek::seek(&mut self.inner, pos)) in poll_seek()
175 Poll::Ready(io::Read::read(&mut self.inner, buf)) in poll_read()
183 Poll::Ready(io::Read::read_vectored(&mut self.inner, bufs)) in poll_read_vectored()
192 Poll::Ready(io::BufRead::fill_buf(&mut self.get_mut().inner)) in poll_fill_buf()
205 Poll::Ready(io::Write::write(&mut self.inner, buf))
211 Poll::Ready(io::Write::write_vectored(&mut self.inner, bufs))
215 Poll::Ready(io::Write::flush(&mut self.inner))
Dallow_std.rs34 return Poll::Ready(Err(e));
85 Poll::Ready(Ok(try_with_interrupt!(self.0.write(buf)))) in poll_write()
91 Poll::Ready(Ok(try_with_interrupt!(self.0.write_vectored(bufs)))) in poll_write_vectored()
96 Poll::Ready(Ok(())) in poll_flush()
130 Poll::Ready(Ok(try_with_interrupt!(self.0.read(buf)))) in poll_read()
136 Poll::Ready(Ok(try_with_interrupt!(self.0.read_vectored(bufs)))) in poll_read_vectored()
155 Poll::Ready(Ok(try_with_interrupt!(self.0.seek(pos)))) in poll_seek()
173 Poll::Ready(Ok(try_with_interrupt!(unsafe { &mut *this }.0.fill_buf()))) in poll_fill_buf()
/external/rust/crates/futures-util/src/stream/
Dselect.rs114 Poll::Ready(Some(item)) => { in poll_inner()
117 return Poll::Ready(Some(item)) in poll_inner()
119 Poll::Ready(None) => true, in poll_inner()
124 Poll::Ready(Some(item)) => { in poll_inner()
125 Poll::Ready(Some(item)) in poll_inner()
127 Poll::Ready(None) if a_done => Poll::Ready(None), in poll_inner()
128 Poll::Ready(None) | Poll::Pending => Poll::Pending, in poll_inner()
/external/rust/crates/futures-channel/benches/
Dsync_mpsc.rs35 assert_eq!(Poll::Ready(Some(i)), rx.poll_next_unpin(&mut cx)); in unbounded_1_tx()
56 assert_eq!(Poll::Ready(Some(i)), rx.poll_next_unpin(&mut cx)); in unbounded_100_tx()
71 assert_eq!(Poll::Ready(Some(i)), rx.poll_next_unpin(&mut cx)); in unbounded_uncontended()
97 Poll::Ready(Some(this.last)) in poll_next()
111 assert_eq!(Poll::Ready(Some(i + 1)), tx.poll_next_unpin(&mut cx)); in bounded_1_tx()
113 assert_eq!(Poll::Ready(Some(i + 1)), rx.poll_next_unpin(&mut cx)); in bounded_1_tx()
136 assert_eq!(Poll::Ready(Some(i + 1)), x.poll_next_unpin(&mut cx)); in bounded_100_tx()
140 assert_eq!(Poll::Ready(Some(i + 1)), rx.poll_next_unpin(&mut cx)); in bounded_100_tx()
/external/rust/crates/tokio/src/sync/tests/
Dloom_oneshot.rs6 use std::task::Poll::{Pending, Ready};
33 Ready(Ok(value)) => { in changing_rx_task()
35 Ready(true) in changing_rx_task()
37 Ready(Err(_)) => unimplemented!(), in changing_rx_task()
38 Pending => Ready(false), in changing_rx_task()
81 Ready(fut.poll(cx).is_ready()) in poll()

12345678910>>...18