MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / poll

Method poll

crates/guest-rust/src/rt/async_support.rs:617–625  ·  view source on GitHub ↗
(mut self: Pin<&mut Self>, context: &mut Context<'_>)

Source from the content-addressed store, hash-verified

615 type Output = ();
616
617 fn poll(mut self: Pin<&mut Self>, context: &mut Context<'_>) -> Poll<()> {
618 if self.yielded {
619 Poll::Ready(())
620 } else {
621 self.yielded = true;
622 context.waker().wake_by_ref();
623 Poll::Pending
624 }
625 }
626 }
627
628 Yield::default().await;

Callers 2

callbackMethod · 0.45
block_onFunction · 0.45

Calls 1

wake_by_refMethod · 0.80

Tested by

no test coverage detected