Hello everyone, had some questions about preview 2. I was wondering if we call ready() on the subscribe_duration pollable can it still resolve? Issue I'm coming into is that poll is blocking my event loop until its "ready".
Calling ready doesn't do anything to cause a pollable to resolve; it just reports whether the pollable has happened to resolve already.
Dan Gohman said:
Calling ready doesn't do anything to cause a pollable to resolve; it just reports whether the pollable has happened to resolve already.
So I guess it's mostly used in conjunction with the poll method?
Yeah. See for example https://github.com/yoshuawuyts/wasm-http-tools/blob/main/crates/wasi-async-runtime, which is an implementation of a Rust async runtime that uses poll and ready.
Oh yes I have been going through this. Okay that is awesome ty!
Last updated: Nov 22 2024 at 16:03 UTC