Trait concurrency_traits::ThreadFunctions[][src]

pub trait ThreadFunctions {
    fn sleep(self, duration: Duration);
fn yield_now(self); }

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

Required methods

fn sleep(self, duration: Duration)[src]

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

fn yield_now(self)[src]

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

Loading content...

Implementors

Loading content...