Crate idle

Source
Expand description

Collection of idle strategies to be used by thread(s) when they have no work to perform.

§Examples

use std::time::Duration;
use idle::IdleStrategy;

let idle = IdleStrategy::Sleep(Duration::from_millis(1));
loop {
    // application logic
    idle.idle(0);
}

Enums§

IdleStrategy
Collection of idle strategies to be used by thread(s) when they have no work to perform. Requires work_count to be passed that for some strategies is used as hint and ignored otherwise.