View source code
Display the source code in core/sync/mutex.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Class core.sync.mutex.Mutex
This class represents a general purpose, recursive mutex.
Inherits from
-
(base class)Object -
object.Object. Monitor
Constructors
| Name | Description |
|---|---|
this
|
Initializes a mutex object.
|
this
|
Initializes a mutex object and sets it as the monitor for o.
|
Methods
| Name | Description |
|---|---|
lock
|
If this lock is not already held by the caller, the lock is acquired,
then the internal counter is incremented by one.
|
tryLock
|
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.
|
unlock
|
Decrements the internal lock count by one. If this brings the count to
zero, the lock is released.
|
factory
|
Create instance of class specified by the fully qualified name
classname.
The class must either have no constructors or have
a default constructor.
|
opCmp
|
Compare with another Object obj.
|
opEquals
|
Returns !=0 if this object does have the same contents as obj.
|
toHash
|
Compute hash function for Object.
|
toString
|
Convert Object to a human readable string.
|
Authors
Sean Kelly