#include <Pt/System/Mutex.h>
Scoped lock for a Mutex. More...
Inherits NonCopyable.
Public Member Functions | |
| MutexLock (Mutex &m, bool doLock=true, bool isLocked=false) | |
| Construct to guard a Mutex. | |
| ~MutexLock () | |
| Unlocks the mutex unless unlock() was called. | |
| void | lock () |
| Lock the mutex. | |
| void | unlock () |
| Unlock so that the destructor does not unlock. | |
| Mutex & | mutex () |
| Returns the guarded the mutex object. | |
| const Mutex & | mutex () const |
| Returns the guarded the mutex object. | |
MutexLock locks a Mutex in the constructor and unlocks it in the destructor, including during stack unwinding.