core.sync.condition
The condition module provides a primitive for synchronized condition checking. License:Boost License 1.0 Authors:
Sean Kelly Source:
core/sync/condition.d
- 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.
- Initializes a condition object which is associated with the supplied
mutex object.
Parameters:
Throws:Mutex m The mutex with which this condition will be associated.
SyncException on error. - Gets the mutex associated with this condition.
Returns:
The mutex associated with this condition. - Wait until notified.
Throws:
SyncException on error. - Suspends the calling thread until a notification occurs or until the
supplied time period has elapsed.
Parameters:
In:Duration val The time to wait.
val must be non-negative. Throws:
SyncException on error. Returns:
true if notified before the timeout and false if not. - Deprecated. It will be removed in December 2012. Please use the
version which takes a Duration instead.
Suspends the calling thread until a notification occurs or until the
supplied time period has elapsed.
Parameters:
In:long period The time to wait, in 100 nanosecond intervals. This value may be adjusted to equal the maximum wait period supported by the target platform if it is too large.
period must be non-negative. Throws:
SyncException on error. Returns:
true if notified before the timeout and false if not. - Notifies one waiter.
Throws:
SyncException on error. - Notifies all waiters.
Throws:
SyncException on error.