As previously discussed in #1 and goal set in #2, this pull request introduces an exciting function: _poll, which has a Unix-like interface and calls to poll_oneoff to block on a few fd:event tuples until at least one of them is triggered OR the timeout has passed.
While poll_oneoff supports no timeout natively, it still supports clock event and that's how we implemented timeout.
We will need to patch our wazero fork for a better poll_oneoff for sure. Currently, our fork will not correctly support the timeout and will block on fd indefinitely.
As previously discussed in #1 and goal set in #2, this pull request introduces an exciting function:
_poll
, which has a Unix-like interface and calls topoll_oneoff
to block on a few fd:event tuples until at least one of them is triggered OR the timeout has passed.While
poll_oneoff
supports notimeout
natively, it still supports clock event and that's how we implemented timeout.We will need to patch our wazero fork for a better
poll_oneoff
for sure. Currently, our fork will not correctly support the timeout and will block onfd
indefinitely.