Stream: wasi

Topic: Is `poll_oneoff`edge-triggered or level-triggered


view this post on Zulip anb (Mar 20 2023 at 04:49):

Pretty much as the topic, maybe I missed, but I didn't find it was mentioned anywhere. Or is this implementation dependent? Tokio seems to be assuming(?) the underlying poll API to be edge-triggered though. Thanks!

view this post on Zulip Dan Gohman (Mar 20 2023 at 13:08):

It's level-triggered, like traditional Unix poll.

view this post on Zulip Dan Gohman (Mar 20 2023 at 13:09):

I'm not familiar with Tokio at this depth; do you in what way it might be depending on the poll API being edge-triggered?

view this post on Zulip anb (Mar 20 2023 at 17:35):

Thank you Dan. IIUC, tokio/mio works for ET based API(there's an open PR to support poll like LT based one), which makes it a bit hard to use tokio inside WASI directly.

This PR adds support for using the Unix poll API as a backend. Why this is required There are some operating systems out there which only support poll (or other API's). The main challenge here was ...

Last updated: Nov 22 2024 at 17:03 UTC