Skip to content

Commit

Permalink
Require there to be at least one item.
Browse files Browse the repository at this point in the history
  • Loading branch information
badeend committed Feb 1, 2024
1 parent 324be89 commit 997b406
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ containing only this pollable.</p>
interest, and waits until one or more of the events is ready for I/O.</p>
<p>The result <code>list&lt;u32&gt;</code> contains one or more indices of handles in the
argument list that is ready for I/O.</p>
<p>If the list contains more elements than can be indexed with a <code>u32</code>
value, this function traps.</p>
<p>This function traps if either:</p>
<ul>
<li>the list is empty, or:</li>
<li>the list contains more elements than can be indexed with a <code>u32</code> value.</li>
</ul>
<p>A timeout can be implemented by adding a pollable from the
wasi-clocks API to the list.</p>
<p>This function does not return a <code>result</code>; polling in itself does not
Expand Down
5 changes: 3 additions & 2 deletions wit/poll.wit
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ interface poll {
/// The result `list<u32>` contains one or more indices of handles in the
/// argument list that is ready for I/O.
///
/// If the list contains more elements than can be indexed with a `u32`
/// value, this function traps.
/// This function traps if either:
/// - the list is empty, or:
/// - the list contains more elements than can be indexed with a `u32` value.
///
/// A timeout can be implemented by adding a pollable from the
/// wasi-clocks API to the list.
Expand Down

0 comments on commit 997b406

Please sign in to comment.