Trait rsevents::Awaitable [−][src]
pub trait Awaitable { fn wait(&self); fn wait_for(&self, limit: Duration) -> bool; fn wait0(&self) -> bool; }
Required Methods
fn wait(&self)
Check if the event has been signalled, and if not, block waiting for it to be set.
fn wait_for(&self, limit: Duration) -> bool
Check if the event has been signalled, and if not, block for limit
waiting for it to be set.
Returns true
if the event was originally set or if it was signalled within the specified
duration, and false
otherwise (if the timeout elapsed without the event becoming set).
fn wait0(&self) -> bool
Test if an event is available without blocking, return false
immediately if it is not
set. Note that this is not the same as calling Awaitable::wait_for()
with a Duration
of
zero, as the calling thread never yields.
Implementors
impl Awaitable for AutoResetEvent
impl Awaitable for ManualResetEvent