core.sync.mutex
The mutex module provides a primitive for maintaining mutually exclusive access. License:Boost License 1.0 Authors:
Sean Kelly Source:
core/sync/mutex.d
- This class represents a general purpose, recursive mutex.
- Initializes a mutex object.
Throws:
SyncException on error. - Initializes a mutex object and sets it as the monitor for o.
In:
o must not already have a monitor. - If this lock is not already held by the caller, the lock is acquired,
then the internal counter is incremented by one.
Throws:
SyncException on error. - Decrements the internal lock count by one. If this brings the count to
zero, the lock is released.
Throws:
SyncException on error. - If the lock is held by another caller, the method returns. Otherwise,
the lock is acquired if it is not already held, and then the internal
counter is incremented by one.
Throws:
SyncException on error. Returns:
true if the lock was acquired and false if not.