This PR addresses a few TODO in the poll_oneoff implementation to be more resilient to invalid configurations.
I also modified the signature of PollOneOff to take the input and output buffers as arguments and return the number of events written to the output buffer instead of doing an append (same model as the default WASI); I did this to be able to correlate the indexes of subscriptions and events, which was helpful to support assigning errors to events.
This PR addresses a few TODO in the
poll_oneoff
implementation to be more resilient to invalid configurations.I also modified the signature of
PollOneOff
to take the input and output buffers as arguments and return the number of events written to the output buffer instead of doing anappend
(same model as the default WASI); I did this to be able to correlate the indexes of subscriptions and events, which was helpful to support assigning errors to events.