Recursive lock class. More...
Classes | |
class | Block |
Utility class to acquire a lock that is released by the destructor. More... |
|
Public Member Functions | |
Recursive_lock () | |
Constructor. More... |
|
~Recursive_lock () | |
Destructor. More... |
|
Protected Member Functions | |
void | lock () |
Locks the lock. More... |
|
bool | try_lock () |
Tries to lock the lock. More... |
|
void | unlock () |
Unlocks the lock. More... |
|
Recursive lock class.
The lock implements a critical region that only one thread can enter at a time. The lock is recursive, i.e., a thread that holds the lock can lock it again.
Pre- and post-conditions are checked via mi_base_assert.
mi::base::Recursive_lock::Recursive_lock | ( | ) |
Constructor.
mi::base::Recursive_lock::~Recursive_lock | ( | ) |
Destructor.
|
protected |
Locks the lock.
|
protected |
Tries to lock the lock.
|
protected |
Unlocks the lock.