idle 0.2.0

Collection of idle strategies to be used by thread(s) when they have no work to perform.
Documentation
  • Coverage
  • 83.33%
    5 out of 6 items documented2 out of 3 items with examples
  • Size
  • Source code size: 5.96 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.29 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • HaveFunTrading/idle
    1 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • HaveFunTrading

Build Status Crates.io Documentation License: MIT

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

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

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