Crates.io | idle |
lib.rs | idle |
version | 0.2.0 |
source | src |
created_at | 2024-04-06 17:45:36.34943 |
updated_at | 2024-04-06 18:05:39.843033 |
description | Collection of idle strategies to be used by thread(s) when they have no work to perform. |
homepage | |
repository | https://github.com/HaveFunTrading/idle |
max_upload_size | |
id | 1198446 |
size | 6,298 |
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);
}