|
Dev Essential
|
#include <shared_mutex.h>
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 () |
| 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 () |
| void | unlock_shared () |
| Unlock the mutex (shared ownership) | |
A shared_mutex class as a workaround for std::shared_timed_mutex
| bool a_util::concurrency::shared_mutex::try_lock | ( | ) |
Try to lock the mutex.
true if successfully locked, false otherwise. | bool a_util::concurrency::shared_mutex::try_lock_shared | ( | ) |
Try to lock the mutex for shared ownership
true if successfully locked, false otherwise