pub struct Condvar<'self> { priv is_mutex: bool, priv failed: &'self mut bool, priv cond: &'self Condvar<'self>, }
As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
impl<'self> Condvar<'self>
fn wait(&self)
Atomically exit the associated Arc and block until a signal is sent.
fn wait_on(&self, condvar_id: uint)
Atomically exit the associated Arc and block on a specified condvar until a signal is sent on that same condvar (as sync::cond.wait_on).
wait() is equivalent to wait_on(0).
fn signal(&self) -> bool
Wake up a blocked task. Returns false if there was no blocked task.
fn signal_on(&self, condvar_id: uint) -> bool
Wake up a blocked task on a specified condvar (as sync::cond.signal_on). Returns false if there was no blocked task.
fn broadcast(&self) -> uint
Wake up all blocked tasks. Returns the number of tasks woken.
fn broadcast_on(&self, condvar_id: uint) -> uint
Wake up all blocked tasks on a specified condvar (as sync::cond.broadcast_on). Returns the number of tasks woken.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).