Struct rayon_core::sleep::IdleState
source · pub(crate) struct IdleState {
worker_index: usize,
rounds: u32,
jobs_counter: JobsEventCounter,
}
Expand description
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.
Fields§
§worker_index: usize
What is worker index of the idle thread?
rounds: u32
How many rounds have we been circling without sleeping?
jobs_counter: JobsEventCounter
Once we become sleepy, what was the sleepy counter value?
Set to INVALID_SLEEPY_COUNTER
otherwise.
Implementations§
source§impl IdleState
impl IdleState
fn wake_fully(&mut self)
fn wake_partly(&mut self)
Auto Trait Implementations§
impl Freeze for IdleState
impl RefUnwindSafe for IdleState
impl Send for IdleState
impl Sync for IdleState
impl Unpin for IdleState
impl UnwindSafe for IdleState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more