MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / poll

Method poll

tests/all/async_functions.rs:799–807  ·  view source on GitHub ↗
(mut self: Pin<&mut Self>, cx: &mut Context<'_>)

Source from the content-addressed store, hash-verified

797 type Output = (F::Output, usize);
798
799 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
800 match Pin::new(&mut self.future).poll(cx) {
801 Poll::Pending => {
802 self.yields += 1;
803 Poll::Pending
804 }
805 Poll::Ready(e) => Poll::Ready((e, self.yields)),
806 }
807 }
808}
809
810pub struct PollOnce<F>(Option<F>);

Callers 2

suspend_while_suspendingFunction · 0.45
resume_separate_thread3Function · 0.45

Calls 4

OkFunction · 0.85
newFunction · 0.50
unwrapMethod · 0.45
takeMethod · 0.45

Tested by

no test coverage detected