Wasm Directoryalpha
Resource

pollable

pollable represents a single I/O event which may be ready, or not.

resource pollable;

F ready

ready: func() -> bool;

Return the readiness of a pollable. This function never blocks.

Returns true when the pollable is ready, and false otherwise.

F block

block: func();

block returns immediately if the pollable is ready, and otherwise blocks until ready.

This function is equivalent to calling poll.poll on a list containing only this pollable.