Stream: wasmtime

Topic: Wasi:clocks subscribe_duration use


view this post on Zulip Cwasi4wasm (Mar 01 2024 at 00:30):

I'm looking to implement subscribe_duration as a future in our system. I'm setting up the poll by calling subscribe_duration and on each poll I am checking the ready function to see if the pollable has elapsed. Was wondering if this is the right approach since I don't want our future loop to block

view this post on Zulip Alex Crichton (Mar 01 2024 at 00:36):

That's sort of what wasi does today although it calls sleep again each time poll is called, but there's no fundamental reason for that, it should be ok to create the sleeping future once too


Last updated: Dec 23 2024 at 13:07 UTC