core.sync.condition

The condition module provides a primitive for synchronized condition checking.

class Condition

Types 1

This class represents a condition variable as conceived by C.A.R. Hoare. As per Mesa type monitors however, "signal" has been replaced with "notify" to indicate that control is not transferred to the waiter when a notification is sent.

Methods
Mutex mutex() @propertyGets the mutex associated with this condition.
shared(Mutex) mutex() @property sharedditto
Mutex mutex_nothrow() @property pure nothrow @safe @nogc
shared(Mutex) mutex_nothrow() @property shared pure nothrow @safe @nogc
void wait()Wait until notified.
void wait() sharedditto
void wait(this Q)( bool _unused_ ) if (is(Q == Condition) || is(Q == shared Condition))ditto
bool wait( Duration val )Suspends the calling thread until a notification occurs or until the supplied time period has elapsed.
bool wait( Duration val ) sharedditto
bool wait(this Q)( Duration val, bool _unused_ ) if (is(Q == Condition) || is(Q == shared Condition))ditto
void notify()Notifies one waiter.
void notify() sharedditto
void notify(this Q)( bool _unused_ ) if (is(Q == Condition) || is(Q == shared Condition))ditto
void notifyAll()Notifies all waiters.
void notifyAll() sharedditto
void notifyAll(this Q)( bool _unused_ ) if (is(Q == Condition) || is(Q == shared Condition))ditto
Constructors
this( Mutex m )Initializes a condition object which is associated with the supplied mutex object.
this( shared Mutex m )ditto
this( M m, bool _unused_ )
Destructors