Module rayon_core::sleep

source ·
Expand description

Code that decides when workers should go to sleep. See README.md for an overview.

Modules

Structs

  • IdleState 🔒
    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.
  • The “sleep state” for an individual worker.

Constants