![]() |
MySQL 26.7.0
Source Code Documentation
|
Scope guard to unlock an object. More...
#include <lock_guard_object.h>
Public Member Functions | |
| void | reset () |
| Unlocks the object if the locked flag is set and then resets the flag. More... | |
| ~Lock_guard_object () | |
| Destructor that unlocks if not unlocked. More... | |
| Lock_guard_object (Type *module) | |
| Constructor. More... | |
Protected Attributes | |
| Type * | m_obj |
| Locked object pointer. More... | |
| bool | locked {true} |
| Lock flag. More... | |
Scope guard to unlock an object.
Assumes the object is locked upon construction and calls unlock() on destruction unless reset() is called.
| Type | of the object to unlock |
|
inline |
Destructor that unlocks if not unlocked.
|
inline |
Constructor.
| module | Pointer to the object to unlock |
|
inline |
Unlocks the object if the locked flag is set and then resets the flag.
|
protected |
Lock flag.
|
protected |
Locked object pointer.