Skip to main content

Module source

Module source 

Source
Expand description

IoSource — RAII wrapper that registers an OS handle with the reactor.

Constructing an IoSource registers the handle; dropping it deregisters. The readable() and writable() methods return futures that resolve when the underlying OS handle becomes ready.

Waker integration: on each poll the future stores the current waker in the reactor’s WakerRegistry. When the reactor fires an event for this token the stored waker is called, re-scheduling the waiting task.

Structs§

IoSource
RAII I/O source registered with the thread-local reactor.
ReadableFuture
Future returned by IoSource::readable.
WritableFuture
Future returned by IoSource::writable.