|
casacore
|
Exception-safe lock/unlock of a mutex. More...
#include <Mutex.h>
Public Member Functions | |
| ScopedMutexLock (Mutex &mutex) | |
| Create a lock on the mutex. More... | |
| ~ScopedMutexLock () | |
| The destructor automatically unlocks the mutex. More... | |
Private Member Functions | |
| ScopedMutexLock (const ScopedMutexLock &) | |
| Forbid copy constructor. More... | |
| ScopedMutexLock & | operator= (const ScopedMutexLock &) |
| Forbid assignment. More... | |
Private Attributes | |
| Mutex & | itsMutexRef |
Exception-safe lock/unlock of a mutex.
Public interface
The constructor of this class locks a mutex, while the destructor unlocks it. In this way the user does not need to take care of unlocking a mutex and is mutex locking fully exception-safe
|
inline |
|
inline |
The destructor automatically unlocks the mutex.
Definition at line 155 of file Mutex.h.
References casacore::Mutex::operator=().
|
private |
Forbid copy constructor.
|
private |
Forbid assignment.
1.8.13