Lines Matching refs:pollable
40 /// `pollable` represents a single I/O event which may be ready, or not.
42 resource pollable {
43 /// Return the readiness of a pollable. This function never blocks.
45 /// Returns `true` when the pollable is ready, and `false` otherwise.
48 /// `block` returns immediately if the pollable is ready, and otherwise
52 /// containing only this pollable.
69 /// A timeout can be implemented by adding a pollable from the
77 poll: func(in: list<borrow<pollable>>) -> list<u32>;
90 use poll.{pollable};
114 /// use the `subscribe` function to obtain a `pollable` which can be polled
129 /// pollable given by `subscribe` will be ready when more bytes are
160 /// Create a `pollable` which will resolve once either the specified stream
163 /// The created `pollable` is a child resource of the `input-stream`.
165 /// all derived `pollable`s created with this function are dropped.
167 subscribe: func() -> pollable;
176 /// accept data, the `subscribe` function to obtain a `pollable` which can be
190 /// When this function returns 0 bytes, the `subscribe` pollable will
218 /// let pollable = this.subscribe();
221 /// pollable.block();
230 /// pollable.block();
244 /// completed. The `subscribe` pollable will become ready when the
252 /// Create a `pollable` which will resolve once the output-stream
254 /// pollable is ready, `check-write` will return `ok(n)` with n>0, or an
257 /// If the stream is closed, this pollable is always ready immediately.
259 /// The created `pollable` is a child resource of the `output-stream`.
261 /// all derived `pollable`s created with this function are dropped.
263 subscribe: func() -> pollable;
281 /// let pollable = this.subscribe();
284 /// pollable.block();
292 /// pollable.block();