Trait pasts::Park

source ·
pub trait Park: Default + Send + Sync + 'static {
    // Required methods
    fn park(&self);
    fn unpark(&self);
}
Expand description

Trait for implementing the parking / unparking threads.

Required Methods§

source

fn park(&self)

The park routine; should put the processor or thread to sleep in order to save CPU cycles and power, until the hardware tells it to wake up.

source

fn unpark(&self)

Wake the processor or thread.

Implementors§