OpendTect
6.6
|
Is a lock that allows a thread to have exlusive rights to something. More...
Public Member Functions | |
Mutex (bool recursive=false) | |
Mutex (const Mutex &) | |
virtual | ~Mutex () |
int | getCount () const |
void | lock () |
bool | tryLock () |
void | unLock () |
Protected Attributes | |
int | count_ |
Only set in debug-mode. More... | |
ThreadID | lockingthread_ |
Only set in debug-mode. More... | |
QMutex * | qmutex_ |
Is a lock that allows a thread to have exlusive rights to something.
It is guaranteed that once locked, no one else will be able to lock it before it is unlocked. If a thread tries to lock it, it will be postponed until the thread that has locked it will unlock it.
<>
Threads::Mutex::Mutex | ( | bool | recursive = false | ) |
Threads::Mutex::Mutex | ( | const Mutex & | ) |
|
virtual |
|
inline |
void Threads::Mutex::lock | ( | ) |
bool Threads::Mutex::tryLock | ( | ) |
Returns true if mutex is locked. If it is locked, it you must unLock it when you are finished. If it returns false, carry on with your life.
void Threads::Mutex::unLock | ( | ) |
|
protected |
Only set in debug-mode.
|
protected |
Only set in debug-mode.
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022