MCPcopy Create free account
hub / github.com/bytecodealliance/wstd / subscribe_no_duration

Function subscribe_no_duration

src/runtime/reactor.rs:315–322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313 // immediately.
314 #[test]
315 fn subscribe_no_duration() {
316 crate::runtime::block_on(async {
317 let reactor = Reactor::current();
318 let pollable = wasip2::clocks::monotonic_clock::subscribe_duration(0);
319 let sched = reactor.schedule(pollable);
320 sched.wait_for().await;
321 })
322 }
323 // Using WASMTIME_LOG, observe that this test calls poll() until the timer is ready.
324 #[test]
325 fn subscribe_some_duration() {

Callers

nothing calls this directly

Calls 3

block_onFunction · 0.85
scheduleMethod · 0.80
wait_forMethod · 0.80

Tested by

no test coverage detected