RAII scoped locker for Mutex. More...
#include <mutex.h>
Public Member Functions | |
| Locker (Mutex &mutex) | |
| Constructs a Locker and locks the given mutex. | |
| ~Locker () | |
| Destructor. Unlocks the mutex. | |
| Locker (const Locker &)=delete | |
| Locker & | operator= (const Locker &)=delete |
| Locker (Locker &&)=delete | |
| Locker & | operator= (Locker &&)=delete |
RAII scoped locker for Mutex.
Acquires the mutex on construction and releases it on destruction. Non-copyable and non-movable.
|
inline |
Constructs a Locker and locks the given mutex.
| mutex | The mutex to lock. |