|
taco-db
0.1.0
|
MutexGuard is similar to std::lock_guard but it stores a pointer to a mutex and allows one to store a nullptr instead. More...
#include <utils/MutexGuard.h>
Public Member Functions | |
| MutexGuard () | |
| MutexGuard (std::mutex *m) | |
Public Member Functions inherited from taco::ResourceGuard< std::mutex *, MutexReleaseFunc, std::mutex *, nullptr > | |
| ResourceGuard () | |
| ResourceGuard (std::mutex * val) | |
| ResourceGuard (const ResourceGuard &)=delete | |
| ResourceGuard (ResourceGuard &&other) | |
| ~ResourceGuard () | |
| ResourceGuard & | operator= (const ResourceGuard &)=delete |
| ResourceGuard & | operator= (ResourceGuard &&other) |
| operator std::mutex * () const | |
| std::mutex * | Get () const |
| operator bool () const | |
| bool | IsValid () const |
| void | Reset () |
| Relinquishes the underlying resource and sets its to an invalid value. More... | |
| std::mutex * | Release () |
| Releases the underlying resource without relinquishing it and returns it to the caller. More... | |
| constexpr bool | operator== (std::mutex * rhs) const |
| constexpr bool | operator!= (std::mutex * rhs) const |
MutexGuard is similar to std::lock_guard but it stores a pointer to a mutex and allows one to store a nullptr instead.
|
inline |
|
inline |