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: Nov 22 2024 at 16:03 UTC