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
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