Base Framework
|
Recursive mutual exclusion synchronization object. More...
#include <base/concurrency/RecursiveMutualExclusion.h>
Public Types | |
typedef ExclusiveSynchronize< RecursiveMutualExclusion > | Sync |
![]() | |
typedef ExclusiveSynchronize< Lock > | Sync |
Public Member Functions | |
RecursiveMutualExclusion () | |
void | exclusiveLock () const |
bool | tryExclusiveLock () const |
void | sharedLock () const |
bool | trySharedLock () const |
void | releaseLock () const |
~RecursiveMutualExclusion () | |
![]() | |
String | getDescription () const |
void | setDescription (const String &description) |
unsigned int | getResourceId () const |
unsigned int | getCreatedById () const |
AnyReference | getHandle () const noexcept |
template<class TYPE > | |
TYPE & | getInternalHandle () const |
operator bool () const noexcept | |
![]() | |
Lock () noexcept | |
virtual | ~Lock () |
Additional Inherited Members | |
![]() | |
AnyReference | handle |
Recursive mutual exclusion synchronization object.
This class implements a recursive mutual exclusion object.
RecursiveMutualExclusion::RecursiveMutualExclusion | ( | ) |
Initializes a mutual exclusion object in the unlocked state. Raises ResourceException if unable to initialize the object.
RecursiveMutualExclusion::~RecursiveMutualExclusion | ( | ) |
Destroys the mutual exclusion object. The mutual exclusion must be in the unlocked state prior to destruction. Raises MutualExclusionException on failure.
|
virtual |
Requests a lock on this mutual exclusion object. The calling thread is suspended if the mutex has been locked by another thread. Does nothing if the calling thread already has a lock on the object. Raises MutualExclusionException on undefined failure.
Implements Lock.
|
virtual |
This method unlocks this mutual exclusion object. The calling thread must have a lock on this mutual exlusion object prior to invocation otherwise the behavior is undefined. Raises MutualExclusionException on failure.
Implements Lock.
|
inlinevirtual |
Requests a lock on this mutual exclusion object. The calling thread is suspended if the mutex has been locked by another thread. Does nothing if the calling thread already has a lock on the object. Raises MutualExclusionException on undefined failure.
Implements Lock.
|
virtual |
Attempts to lock this mutual exclusion object. Raises MutualExclusionException on failure.
Implements Lock.
|
inlinevirtual |
Attempts to lock this mutual exclusion object. Raises MutualExclusionException on failure.
Implements Lock.