WebAssembly / WebAssembly/WASI

Ordering constraints on indices returned by `wasi:io/poll/poll`?

Open
#679 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-io S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

The wasi:io/poll/poll function returns a list of indices into the list of pollables that was passed in to indicate readiness for them. Currently it's not documented which order these indices should appear in, so e.g. [3,1,0,2] would seemingly be a valid response.

Can we document the required order, and can we ideally require that the indices should be in ascending order? That'd make it more straight-forward to use the list of pollables as an event queue that is processed in first-in, first-(ready-)out order.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the wasi:io/poll/poll contract described in this issue and review the existing comment discussion for prior decisions. Determine whether readiness indices must be ordered and whether ascending order is normative; done means the specification states the ordering unambiguously and the behavior is resolved.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.