Module rayon_core::sleep
source ยท Expand description
Code that decides when workers should go to sleep. See README.md for an overview.
Modulesยง
- counters ๐
Structsยง
- Idle
State ๐An instance of this struct is created when a thread becomes idle. It is consumed when the thread finds work, and passed by&mut
reference for operations that preserve the idle state. (In other words, producing one of these structs is evidence the thread is idle.) It tracks state such as how long the thread has been idle. - Sleep ๐The
Sleep
struct is embedded into each registry. It governs the waking and sleeping of workers. It has callbacks that are invoked periodically at significant events, such as when workers are looping and looking for work, when latches are set, or when jobs are published, and it either blocks threads or wakes them in response to these events. See the [README.md
] in this module for more details. - Worker
Sleep ๐State The โsleep stateโ for an individual worker.
Constantsยง
- ROUND
S_ ๐UNTI L_ SLEEPY