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

Function poll

crates/test-programs/src/bin/p2_cli_hostcall_fuel.rs:24–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24fn poll() {
25 let mut events = Vec::new();
26 let sub = wasip2::clocks::monotonic_clock::subscribe_duration(0);
27 for _ in 0..5000 {
28 events.push(&sub);
29 }
30
31 wasip2::io::poll::poll(&events);
32 unreachable!()
33}
34
35fn preopen() -> Descriptor {
36 let mut dirs = wasip2::filesystem::preopens::get_directories();

Callers 10

runFunction · 0.70
test_tcp_busy_pollFunction · 0.70
mainFunction · 0.70
mainFunction · 0.70
mainFunction · 0.70
pollMethod · 0.50
poll_oneoffFunction · 0.50
block_untilMethod · 0.50
readMethod · 0.50
writeMethod · 0.50

Calls 2

newFunction · 0.50
pushMethod · 0.45

Tested by 1

test_tcp_busy_pollFunction · 0.56