Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§