ADTF
3.18.2
|
A shared_mutex class as a workaround for std::shared_timed_mutex. More...
Public Member Functions | |
shared_mutex () | |
CTOR - creates the mutex in an unlocked state. | |
~shared_mutex () | |
DTOR - does not call unlock! | |
void | lock () |
Lock the mutex, blocks if the mutex is not available. | |
bool | try_lock () |
Try to lock the mutex. More... | |
void | unlock () |
Unlock the mutex. | |
void | lock_shared () |
Lock the mutex for shared ownership, blocks if the mutex is not available. | |
bool | try_lock_shared () |
Try to lock the mutex for shared ownership. More... | |
void | unlock_shared () |
Unlock the mutex (shared ownership) | |
Private Member Functions | |
shared_mutex (const shared_mutex &) | |
shared_mutex & | operator= (const shared_mutex &) |
Private Attributes | |
std::unique_ptr< impl > | p |
A shared_mutex class as a workaround for std::shared_timed_mutex.
Definition at line 26 of file shared_mutex.h.
bool try_lock | ( | ) |
Try to lock the mutex.
true
if successfully locked, false
otherwise. bool try_lock_shared | ( | ) |
Try to lock the mutex for shared ownership.
true
if successfully locked, false
otherwise