Trait concurrency_traits::ThreadFunctions[][src]

pub trait ThreadFunctions {
    fn sleep(duration: Duration);
fn yield_now(); }
Expand description

Functions to allow the current thread to interact in ways a thread might need to.

Required methods

fn sleep(duration: Duration)[src]

Sleeps the current thread for a specified duration. Analog for std::thread::sleep.

fn yield_now()[src]

Yields the current thread to the OS. Analog for std::thread::yield_now.

Implementors