Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-blocking poll_list alternative #51

Closed
guybedford opened this issue Oct 16, 2023 · 1 comment
Closed

Non-blocking poll_list alternative #51

guybedford opened this issue Oct 16, 2023 · 1 comment

Comments

@guybedford
Copy link

In JS hosts, implementing poll_list as blocking requires some asyncify work.

It could be nice to have a non-blocking alternative to poll_list that could be used as part of an actual polling scheme, if that kind of a model would be worth considering.

Just being able to inspect if a poll is ready should be enough to support this.

pchickey pushed a commit that referenced this issue Oct 24, 2023
inspecting if a poll is ready without blocking was requested in #51
pchickey pushed a commit that referenced this issue Oct 24, 2023
The name `poll-one` is very easily confused with `poll-oneoff`, the
previous name of `poll-list` during WASI preview 1 and much of the
development of Preview 2.

Inspecting if a poll is ready without blocking was requested in #51
@guybedford
Copy link
Author

pollable.ready() resolves this question.

sunfishcode pushed a commit that referenced this issue Oct 31, 2023
* rename `poll-one` to `pollable.block`, and add `ready` method

The name `poll-one` is very easily confused with `poll-oneoff`, the
previous name of `poll-list` during WASI preview 1 and much of the
development of Preview 2.

Inspecting if a poll is ready without blocking was requested in #51

* rename `poll-list` to `poll`

With `poll-one` renamed to `pollable.block`, there is no longer a
distinction required between `poll-list` and `poll-one`, so change
this name to the simplest name that can possibly work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant