![]() |
mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
|
Convenience class for RAII-style access to a varible within a Lockable object. More...
#include <lockable.h>
Public Member Functions | |
Unlocker (Lockable< LockedVarT, MutexT > &lockable) | |
LockedVarT & | operator* () |
LockedVarT * | operator-> () |
Convenience class for RAII-style access to a varible within a Lockable object.
Locks the internal mutex of the Lockable on construction, unlocks it on deconstruction, providing thread-safe pointer-like access to the variable within using operator*() and operator->().