| 336 | // ready, but not what the waker requests. |
| 337 | #[test] |
| 338 | fn subscribe_multiple_durations() { |
| 339 | crate::runtime::block_on(async { |
| 340 | let reactor = Reactor::current(); |
| 341 | let now = wasip2::clocks::monotonic_clock::subscribe_duration(0); |
| 342 | let soon = wasip2::clocks::monotonic_clock::subscribe_duration(10_000_000); |
| 343 | let now = reactor.schedule(now); |
| 344 | let soon = reactor.schedule(soon); |
| 345 | soon.wait_for().await; |
| 346 | drop(now) |
| 347 | }) |
| 348 | } |
| 349 | |
| 350 | // Using WASMTIME_LOG, observe that this test results in two calls to poll(), one with both |
| 351 | // pollables because both are awaiting, and one with just the later pollable. |