Skip to main content

Module std_host

Module std_host 

Source
Available on crate feature std only.
Expand description

std hosts:

  • StdClock: Instant from an origin, as the core’s Clock; its Timer sleeps the calling thread (an inline host: the future is ready on its first poll).
  • StdIdle: the executor’s idle: thread::sleep to a deadline; a park on a line through the wordwait backend when one was probed, else a yield loop to the bound.
  • Watcher: a background thread that waits on completion lines and wakes the Wakers of futures awaiting them, for consumers on any runtime that are not latency-critical. Each Watch owns one registration, removed when it resolves or is dropped; wakers run with no lock held.

Structs§

StdClock
The monotonic clock of the process, from an origin.
StdIdle
The executor’s idle on a std thread.
Watch
The future of Watcher::wait: Send, usable on any runtime. Dropping it before it resolves (a cancelled await) removes its registration.
Watcher
A thread that watches completion lines and wakes the futures awaiting them. L is anything that holds a line (a backend’s mapped line, an Arc’d plain line).