HDK
|
#include <UT_LockUtil.h>
Public Member Functions | |
UT_UniqueLock ()=delete | |
UT_UniqueLock (UT_EmptyScope) | |
Construct without mutex. Use acquire() to give it a mutex. More... | |
UT_UniqueLock (Lock &mutex, bool acquire=true) | |
Construct with given mutex. Acquires it by default. More... | |
UT_UniqueLock (UT_UniqueLock< Lock > &&scope) | |
~UT_UniqueLock () | |
void | lock () |
Lock the mutex. More... | |
void | lock (Lock &mutex) |
bool | tryLock () |
Try to lock the mutex, return immediately false if someone else owns it. More... | |
bool | tryLock (Lock &mutex) |
bool | safeLock (Lock &mutex) |
void | unlock () |
Unlock the mutex before this object is deleted. More... | |
Like UT_AutoLock except it supports explicit control of when to lock (or unlock) while providing exception safety.
Definition at line 51 of file UT_LockUtil.h.
|
delete |
|
inlineexplicit |
Construct without mutex. Use acquire() to give it a mutex.
Definition at line 57 of file UT_LockUtil.h.
|
inlineexplicit |
Construct with given mutex. Acquires it by default.
Definition at line 64 of file UT_LockUtil.h.
|
inline |
Definition at line 71 of file UT_LockUtil.h.
|
inline |
Definition at line 78 of file UT_LockUtil.h.
|
inline |
Lock the mutex.
Definition at line 87 of file UT_LockUtil.h.
|
inline |
Assign a new mutex reference and lock it
Definition at line 100 of file UT_LockUtil.h.
|
inline |
Lock the mutex, return false if a dead lock was detected.
Definition at line 134 of file UT_LockUtil.h.
|
inline |
Try to lock the mutex, return immediately false if someone else owns it.
Definition at line 110 of file UT_LockUtil.h.
|
inline |
Try to lock the mutex, return immediately false if someone else owns it.
Definition at line 123 of file UT_LockUtil.h.
|
inline |
Unlock the mutex before this object is deleted.
Definition at line 148 of file UT_LockUtil.h.