@@ -18,7 +18,27 @@ at once.</p>
18
18
<h4 ><a name =" pollable " ><code >resource pollable</code ></a ></h4 >
19
19
<hr />
20
20
<h3 >Functions</h3 >
21
- <h4 ><a name =" poll_list " ><code >poll-list: func</code ></a ></h4 >
21
+ <h4 ><a name =" method_pollable.ready " ><code >[method]pollable.ready: func</code ></a ></h4 >
22
+ <p >Return the readiness of a pollable. This function never blocks.</p >
23
+ <p >Returns <code >true</code > when the pollable is ready, and <code >false</code > otherwise.</p >
24
+ <h5 >Params</h5 >
25
+ <ul >
26
+ <li ><a name =" method_pollable.ready.self " ><code >self</code ></a >: borrow< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ; </li >
27
+ </ul >
28
+ <h5 >Return values</h5 >
29
+ <ul >
30
+ <li ><a name =" method_pollable.ready.0 " ></a > <code >bool</code ></li >
31
+ </ul >
32
+ <h4 ><a name =" method_pollable.block " ><code >[method]pollable.block: func</code ></a ></h4 >
33
+ <p ><code >block</code > returns immediately if the pollable is ready, and otherwise
34
+ blocks until ready.</p >
35
+ <p >This function is equivalent to calling <code >poll.poll</code > on a list
36
+ containing only this pollable.</p >
37
+ <h5 >Params</h5 >
38
+ <ul >
39
+ <li ><a name =" method_pollable.block.self " ><code >self</code ></a >: borrow< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ; </li >
40
+ </ul >
41
+ <h4 ><a name =" poll " ><code >poll: func</code ></a ></h4 >
22
42
<p >Poll for completion on a set of pollables.</p >
23
43
<p >This function takes a list of pollables, which identify I/O sources of
24
44
interest, and waits until one or more of the events is ready for I/O.</p >
@@ -34,19 +54,11 @@ the pollables has an error, it is indicated by marking the source as
34
54
being reaedy for I/O.</p >
35
55
<h5 >Params</h5 >
36
56
<ul >
37
- <li ><a name =" poll_list .in" ><code >in</code ></a >: list< ; borrow< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ;> ; </li >
57
+ <li ><a name =" poll .in" ><code >in</code ></a >: list< ; borrow< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ;> ; </li >
38
58
</ul >
39
59
<h5 >Return values</h5 >
40
60
<ul >
41
- <li ><a name =" poll_list.0 " ></a > list< ; <code >u32</code >> ; </li >
42
- </ul >
43
- <h4 ><a name =" poll_one " ><code >poll-one: func</code ></a ></h4 >
44
- <p >Poll for completion on a single pollable.</p >
45
- <p >This function is similar to <a href =" #poll_list " ><code >poll-list</code ></a >, but operates on only a single
46
- pollable. When it returns, the handle is ready for I/O.</p >
47
- <h5 >Params</h5 >
48
- <ul >
49
- <li ><a name =" poll_one.in " ><code >in</code ></a >: borrow< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ; </li >
61
+ <li ><a name =" poll.0 " ></a > list< ; <code >u32</code >> ; </li >
50
62
</ul >
51
63
<h2 ><a name =" wasi:io_streams " >Import interface wasi:io/streams</a ></h2 >
52
64
<p >WASI I/O is an I/O abstraction API which is currently focused on providing
0 commit comments