[][src]Trait yaar_lock::ThreadEvent

pub trait ThreadEvent: Sync + Default {
    fn is_set(&self) -> bool;
fn reset(&self);
fn wait(&self);
fn set(&self); }

Abstraction which provides a method of blocking and unblocking threads through the interface of a manual reset event.

Required methods

fn is_set(&self) -> bool

Approximately check if the event is set or not.

fn reset(&self)

Reset the event back to an un-signalled state.

fn wait(&self)

Block for the event to become signaled. If the event is already signaled, this returns without blocking.

fn set(&self)

Transition the event to a signaled state, unblocking any threads that were waiting on it.

Loading content...

Implementors

impl ThreadEvent for OsThreadEvent[src]

impl<E: ThreadEvent> ThreadEvent for WordEvent<E>[src]

Loading content...