Condition
class Condition {
version(Windows)
HANDLE m_blockLock;
version(Windows)
HANDLE m_blockQueue;
version(Windows)
Mutex m_assocMutex;
version(Windows)
CRITICAL_SECTION m_unblockLock;
version(Windows)
int m_numWaitersGone;
version(Windows)
int m_numWaitersBlocked;
version(Windows)
int m_numWaitersToUnblock;
version(Posix)
Mutex m_assocMutex;
version(Posix)
pthread_cond_t m_hndl;
}
- this
this(Mutex m)
Initializes a condition object which is associated with the supplied
mutex object.
A destructor is present on this object, but not explicitly documented in the source.
- mutex
Mutex mutex()
Gets the mutex associated with this condition.
- notify
void notify()
- notifyAll
void notifyAll()
- wait
void wait()
- wait
bool wait(Duration val)
Suspends the calling thread until a notification occurs or until the
supplied time period has elapsed.
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.