Trait concurrency_traits::ThreadParker [−][src]
pub trait ThreadParker { type ThreadId: Debug; fn park(); fn unpark(thread: Self::ThreadId); fn current_thread() -> Self::ThreadId; }
Expand description
Functions to allow parking functionality for threads.
Associated Types
type ThreadId: Debug
[src]
type ThreadId: Debug
[src]The type of a thread portable id. Analog for std::thread::Thread
.
Required methods
fn park()
[src]
fn park()
[src]Parks the current thread. Analog for std::thread::park
. This may spuriously wake.
fn unpark(thread: Self::ThreadId)
[src]
fn unpark(thread: Self::ThreadId)
[src]Unparks a thread. Analog for std::thread::Thread::unpark
.
fn current_thread() -> Self::ThreadId
[src]
fn current_thread() -> Self::ThreadId
[src]Gets the handle to the current thread. Analog for std::thread::current
.
Implementors
impl ThreadParker for StdThreadFunctions
[src]
impl ThreadParker for StdThreadFunctions
[src]