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

poll_list timeouts #76

Open
guybedford opened this issue Apr 24, 2024 · 2 comments
Open

poll_list timeouts #76

guybedford opened this issue Apr 24, 2024 · 2 comments

Comments

@guybedford
Copy link

guybedford commented Apr 24, 2024

Was it ever discussed to support direct timeout args to poll_list?

Typically to avoid possibly blocking on a long-running task when there are no immediate tasks, one has to create a short timeout, then add that to the list for each call to poll_list, resulting in an extra host call per iteration.

@sunfishcode
Copy link
Member

The intended way to do this is to request a pollable from wasi:clocks/monotonic-clock, such as subscribe-instant or subscribe_duration, and add that to the list passed to poll_list.

@sunfishcode
Copy link
Member

Ah, to answer your question, no, we haven't looked at adding a timeout directly to poll_list. But if there are use cases where the extra host call per iteration is significant, I think we'd be open to considering adding a form of poll_list with a timeout.

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

2 participants