Skip to main content

Module host

Module host 

Source
Expand description

Hosts: the clocks, timers and idles a binary picks. The core never names one.

featuremodulewhat it provides
stdstd_hostStdClock, StdIdle (thread sleep, then a word-wait park or a yield loop), Watcher
tokiotokioa Timer over tokio::time
io-uringuringan Idle whose deadline sleep is IORING_OP_TIMEOUT

Modules§

std_hoststd
std hosts:
tokiotokio
tokio: a Clock + Timer over tokio::time, so wait runs as a tokio task (its predicted sleep is a tokio timer; tokio’s timer wheel has 1 ms resolution, so this host suits consumers that are not latency-critical). Pair it with Watcher to await completion lines from tokio tasks.
uringLinux and io-uring
io_uring: an Idle whose deadline sleep is one IORING_OP_TIMEOUT with a nanosecond timespec (no timer-slack rounding, and the same ring can carry network I/O), and whose line park is the StdIdle park (the CPU’s word wait). The executor kind io-uring.