Home
last modified time | relevance | path

Searched refs:Poll (Results 1 – 25 of 90) sorted by relevance

1234

/wasmtime-44.0.1/crates/misc/component-async-tests/src/
H A Dutil.rs5 task::{Context, Poll},
42 ) -> Poll<Result<StreamResult>> { in poll_produce()
48 Poll::Pending => { in poll_produce()
52 Poll::Pending in poll_produce()
59 Poll::Ready(None) => Poll::Ready(Ok(StreamResult::Dropped)), in poll_produce()
92 Poll::Pending in poll_consume()
133 Poll::Pending if finish => Poll::Ready(Ok(None)), in poll_produce()
134 Poll::Pending => Poll::Pending, in poll_produce()
135 Poll::Ready(result) => Poll::Ready(Ok(Some(result?))), in poll_produce()
157 ) -> Poll<Result<()>> { in poll_consume()
[all …]
/wasmtime-44.0.1/crates/wasi-tls/src/p3/util/
H A Dtokio_streams.rs4 use std::task::{Context, Poll};
48 ) -> Poll<wasmtime::Result<StreamResult>> { in poll_produce()
73 Poll::Ready(Ok(())) => { in poll_produce()
78 Poll::Ready(Err(e)) => { in poll_produce()
82 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_produce()
83 Poll::Pending => Poll::Pending, in poll_produce()
145 Poll::Ready(Ok(0)) => { in poll_consume()
149 Poll::Ready(Ok(n)) => { in poll_consume()
153 Poll::Ready(Err(e)) => { in poll_consume()
157 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_consume()
[all …]
H A Dclosed.rs5 use std::task::{Context, Poll};
18 ) -> Poll<std::io::Result<()>> { in poll_read()
19 Poll::Ready(Err(self.0.clone().into())) in poll_read()
27 ) -> Poll<std::io::Result<usize>> { in poll_write()
28 Poll::Ready(Err(self.0.clone().into())) in poll_write()
32 Poll::Ready(Err(self.0.clone().into())) in poll_flush()
36 Poll::Ready(Err(self.0.clone().into())) in poll_shutdown()
49 ) -> Poll<wasmtime::Result<StreamResult>> { in poll_produce()
50 Poll::Ready(Ok(StreamResult::Dropped)) in poll_produce()
62 ) -> Poll<wasmtime::Result<StreamResult>> { in poll_consume()
[all …]
H A Ddeferred.rs2 use std::task::{Context, Poll, Waker};
45 f: impl FnOnce(Pin<&mut IO>, &mut Context<'_>) -> Poll<T>, in poll_read_io()
46 ) -> Poll<T> in poll_read_io()
53 Poll::Pending in poll_read_io()
62 f: impl FnOnce(Pin<&mut IO>, &mut Context<'_>) -> Poll<T>, in poll_write_io()
63 ) -> Poll<T> in poll_write_io()
70 Poll::Pending in poll_write_io()
82 ) -> Poll<std::io::Result<()>> { in poll_read()
92 ) -> Poll<std::io::Result<usize>> { in poll_write()
96 fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> { in poll_flush()
[all …]
H A Dshared.rs3 use std::task::{Context, Poll};
28 ) -> Poll<std::io::Result<()>> { in poll_read()
37 ) -> Poll<std::io::Result<usize>> { in poll_write()
41 fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> { in poll_flush()
45 fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> { in poll_shutdown()
/wasmtime-44.0.1/crates/wasi-http/src/p3/
H A Dbody.rs8 use core::task::{Context, Poll, ready};
60 ) -> Poll<wasmtime::Result<()>> { in poll_consume()
66 Poll::Ready(Ok(())) in poll_consume()
218 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_consume()
219 Poll::Pending => Poll::Pending, in poll_consume()
252 Poll::Ready(Err(..)) => Poll::Ready(Ok(StreamResult::Dropped)), in poll_consume()
253 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_consume()
254 Poll::Pending => Poll::Pending, in poll_consume()
439 Poll::Ready(Ok(())) in poll_consume()
545 Poll::Pending if finish => return Poll::Ready(Ok(StreamResult::Cancelled)), in poll_produce()
[all …]
H A Drequest.rs274 use core::task::{Poll, ready}; in default_send_request()
415 Poll::Ready(None) => Poll::Ready(None), in default_send_request()
416 Poll::Ready(Some(Err(err))) => { in default_send_request()
419 Poll::Ready(Some(Ok(frame))) => { in default_send_request()
421 Poll::Ready(Some(Ok(frame))) in default_send_request()
423 Poll::Pending => { in default_send_request()
449 Poll::Ready(Ok(res)) => Poll::Ready(Ok(res)), in default_send_request()
450 Poll::Ready(Err(err)) => Poll::Ready(Err(err)), in default_send_request()
451 Poll::Pending => { in default_send_request()
455 return Poll::Pending; in default_send_request()
[all …]
/wasmtime-44.0.1/crates/wasi/src/cli/
H A Dlocked_async.rs7 use std::task::{Context, Poll, ready};
116 ) -> Poll<io::Result<()>> { in poll_read()
120 Poll::Ready(Ok(())) in poll_read()
125 None => Poll::Ready(Ok(())), in poll_read()
222 ) -> Poll<io::Result<usize>> { in poll_write()
226 None => Poll::Ready(Ok(0)), in poll_write()
236 Poll::Ready(Ok(())) in poll_shutdown()
265 ) -> Poll<Option<io::Result<T>>> { in poll()
289 Poll::Ready(()) => {} in poll()
293 Poll::Pending => { in poll()
[all …]
H A Dfile.rs7 use std::task::{Context, Poll};
73 ) -> Poll<io::Result<usize>> { in poll_write()
75 Ok(()) => Poll::Ready(Ok(buf.len())), in poll_write()
76 Err(e) => Poll::Ready(Err(e)), in poll_write()
79 fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_flush()
80 Poll::Ready((&*self.file).flush()) in poll_flush()
82 fn poll_shutdown(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_shutdown()
83 Poll::Ready(Ok(())) in poll_shutdown()
145 ) -> Poll<io::Result<()>> { in poll_read()
149 Poll::Ready(Ok(())) in poll_read()
[all …]
H A Dempty.rs4 use std::task::{Context, Poll};
102 ) -> Poll<io::Result<usize>> { in async_stream()
103 Poll::Ready(Ok(0)) in async_stream()
105 fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in async_stream()
106 Poll::Ready(Ok(())) in async_stream()
108 fn poll_shutdown(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in async_stream()
109 Poll::Ready(Ok(())) in async_stream()
H A Dstdout.rs6 use std::task::{Context, Poll};
102 ) -> Poll<io::Result<usize>> { in poll_write()
103 Poll::Ready(match *self { in poll_write()
108 fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_flush()
109 Poll::Ready(match *self { in poll_flush()
114 fn poll_shutdown(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_shutdown()
115 Poll::Ready(Ok(())) in poll_shutdown()
/wasmtime-44.0.1/crates/wasi/src/p3/sockets/host/types/
H A Dtcp.rs12 use core::task::{Context, Poll};
79 Poll::Pending if finish => return Poll::Ready(Ok(StreamResult::Cancelled)), in poll_produce()
80 Poll::Pending => return Poll::Pending, in poll_produce()
132 Poll::Ready(Ok(())) => Poll::Ready(Ok(StreamResult::Completed)), in poll_produce()
134 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_produce()
135 Poll::Pending => Poll::Pending, in poll_produce()
155 Poll::Pending => return Poll::Pending, in poll_produce()
206 Poll::Ready(Ok(())) => Poll::Ready(Ok(StreamResult::Completed)), in poll_consume()
208 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_consume()
209 Poll::Pending => Poll::Pending, in poll_consume()
[all …]
/wasmtime-44.0.1/crates/wasi/src/p3/cli/
H A Dhost.rs12 use core::task::{Context, Poll};
47 ) -> Poll<wasmtime::Result<StreamResult>> { in poll_produce()
65 Poll::Ready(Ok(())) => { in poll_produce()
70 Poll::Ready(Err(e)) => { in poll_produce()
78 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_produce()
79 Poll::Pending => Poll::Pending, in poll_produce()
98 ) -> Poll<wasmtime::Result<StreamResult>> { in poll_consume()
113 Poll::Ready(Ok(n)) => { in poll_consume()
117 Poll::Ready(Err(e)) => { in poll_consume()
125 Poll::Pending if finish => Poll::Ready(Ok(StreamResult::Cancelled)), in poll_consume()
[all …]
/wasmtime-44.0.1/crates/wasi-tls/src/providers/
H A Dnativetls.rs6 use std::task::Poll;
40 ) -> Poll<io::Result<()>> { in poll_read()
50 ) -> Poll<io::Result<usize>> { in poll_write()
57 ) -> Poll<Result<(), io::Error>> { in poll_flush()
64 ) -> Poll<Result<(), io::Error>> { in poll_shutdown()
66 Poll::Ready(Ok(())) => {} in poll_shutdown()
67 Poll::Ready(Err(e)) => return Poll::Ready(Err(e)), in poll_shutdown()
68 Poll::Pending => return Poll::Pending, in poll_shutdown()
/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dasync_yield_caller.rs17 std::{future::Future, task::Poll},
36 (None | Some(Poll::Ready(())), None | Some(Poll::Ready(()))) => { in run()
37 return Poll::Ready(()); in run()
39 (Some(Poll::Ready(())), _) => run = None, in run()
40 (_, Some(Poll::Ready(()))) => { in run()
47 Poll::Pending in run()
H A Dfuzz_async.rs152 use std::task::{Context, Poll, Waker};
419 Poll::Ready(_) => return Poll::Ready(this.write.cancel()), in run()
423 Poll::Ready(Ok(())) => Poll::Ready(FutureWriteCancel::AlreadySent), in run()
427 Poll::Pending => Poll::Pending, in run()
473 Poll::Ready(_) => return Poll::Ready(this.read.cancel()), in run()
477 Poll::Ready(i) => Poll::Ready(Ok(i)), in run()
478 Poll::Pending => Poll::Pending, in run()
671 Poll::Pending => return Poll::Pending, in run()
728 Poll::Pending => return Poll::Pending, in run()
838 Poll::Ready(i) => i, in assert_ready()
[all …]
H A Dp3_clocks_sleep.rs3 use core::task::{Context, Poll, Waker};
31 Poll::Ready(()), in sleep_0ms()
36 Poll::Ready(()), in sleep_0ms()
46 Poll::Ready(()), in sleep_backwards_in_time()
/wasmtime-44.0.1/crates/misc/component-async-tests/tests/scenario/
H A Dstreams.rs17 task::{self, Context, Poll},
41 ) -> Poll<Result<StreamResult>> { in poll_produce()
47 Poll::Pending => { in poll_produce()
51 Poll::Pending in poll_produce()
54 Poll::Ready(Some(item)) => { in poll_produce()
60 Poll::Ready(None) => Poll::Ready(Ok(StreamResult::Dropped)), in poll_produce()
78 ) -> Poll<Result<StreamResult>> { in poll_consume()
87 Poll::Pending in poll_consume()
93 Poll::Ready(result) => { in poll_consume()
327 ) -> Poll<Result<StreamResult>> { in poll_produce()
[all …]
/wasmtime-44.0.1/crates/wasi/src/
H A Druntime.rs25 use std::task::{Context, Poll, Waker};
78 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { in poll()
80 Poll::Pending => Poll::Pending, in poll()
81 Poll::Ready(r) => Poll::Ready(r.expect("child task panicked")), in poll()
186 Poll::Ready(result) => Some(result), in poll_noop()
187 Poll::Pending => None, in poll_noop()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dasync_yield.rs4 task::{Context, Poll},
23 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> { in poll() argument
25 Poll::Ready(()) in poll()
32 Poll::Pending in poll()
/wasmtime-44.0.1/crates/fuzzing/src/
H A Dlib.rs6 use std::task::{Context, Poll, Waker};
62 Poll::Ready(val) => return val, in block_on()
63 Poll::Pending => {} in block_on()
76 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> { in poll() argument
78 Poll::Ready(()) in poll()
82 Poll::Pending in poll()
/wasmtime-44.0.1/crates/wasi-http/src/
H A Dio.rs6 use std::task::{Context, Poll};
28 ) -> Poll<Result<(), Error>> { in poll_read()
44 ) -> Poll<Result<usize, Error>> { in poll_write()
48 fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>> { in poll_flush()
52 fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>> { in poll_shutdown()
/wasmtime-44.0.1/crates/wasi-http/src/p2/
H A Dbody.rs11 use std::task::{Context, Poll};
122 ) -> Poll<Option<Result<Frame<Bytes>, types::ErrorCode>>> { in poll_frame()
137 if let Poll::Ready(()) = me.timeout.as_mut().poll(cx) { in poll_frame()
447 ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> { in new()
449 Poll::Pending => Poll::Pending, in new()
450 Poll::Ready(Some(frame)) => Poll::Ready(Some(Ok(Frame::data(frame)))), in new()
453 Poll::Ready(None) => { in new()
456 Poll::Pending => { in new()
458 Poll::Pending in new()
469 Poll::Ready(Err(RecvError { .. })) => Poll::Ready(None), in new()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/
H A Dabort.rs4 use std::task::{Context, Poll, Waker};
104 fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { in poll()
117 Poll::Pending in poll()
121 JoinState::Complete => Poll::Ready(()), in poll()
137 fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { in poll()
158 return Poll::Ready(None); in poll()
202 use std::task::{Context, Poll, Waker};
210 Poll::Ready(_) => true, in is_ready()
211 Poll::Pending => false, in is_ready()
/wasmtime-44.0.1/crates/wasi-tls/src/p2/
H A Dio.rs7 use std::task::{Poll, ready};
84 ) -> Poll<std::io::Result<()>> { in poll_read()
98 return Poll::Ready(Ok(())); in poll_read()
117 return Poll::Ready(Ok(())); in poll_read()
121 return Poll::Ready(Ok(())); in poll_read()
125 return Poll::Ready(Err(std::io::Error::other(e))); in poll_read()
143 ) -> std::task::Poll<std::result::Result<usize, std::io::Error>> { in poll_write()
170 Ok(()) => Poll::Ready(Ok(count)), in poll_write()
171 Err(StreamError::Closed) => Poll::Ready(Ok(0)), in poll_write()
190 ) -> std::task::Poll<std::result::Result<(), std::io::Error>> { in poll_flush()
[all …]

1234