A recursive Mutex.
More...
#include <Mutex.h>
A recursive Mutex.
Definition at line 35 of file Mutex.h.
zypp::thread::Mutex::Mutex |
( |
| ) |
|
Create a new recursive Mutex object.
- Exceptions
-
Definition at line 25 of file Mutex.cc.
zypp::thread::Mutex::~Mutex |
( |
| ) |
|
void zypp::thread::Mutex::lock |
( |
| ) |
|
Acquire ownership of this Mutex object.
This call will block if another thread has ownership of this Mutex. When it returns, the current thread is the owner of this Mutex object.
In the same thread, this recursive mutex can be acquired multiple times.
- Exceptions
-
MutexException | if the maximum number of recursive locks for mutex has been exceeded. |
Definition at line 72 of file Mutex.cc.
void zypp::thread::Mutex::unlock |
( |
| ) |
|
Release ownership of this Mutex object.
If another thread is waiting to acquire the ownership of this mutex it will stop blocking and acquire ownership when this call returns.
- Exceptions
-
Definition at line 82 of file Mutex.cc.
bool zypp::thread::Mutex::trylock |
( |
| ) |
|
Try to acquire ownership of this Mutex object.
This call will return false if another thread has ownership of this Mutex or the maximum number of recursive locks for mutex has been exceeded. When it returns true, the current thread is the owner of this Mutex object.
- Returns
- true, if ownership was acquired.
Definition at line 92 of file Mutex.cc.
The documentation for this class was generated from the following files: