An implementation of C++17 shared_mutex primitive for read-write lock. See C++17 shared_mutex and N2406. More...
#include <chsvthrd.h>
Public Member Functions | |
| shared_mutex () | |
| Default c-tor. | |
| void | lock () |
| Locks mutex exclusively. Use unlock to unlock the mutex. The mutex is also automatically unlocked on destruction. | |
| bool | try_lock () |
| Tries to gain exclusive ownership of the mutex and returns false, if another thread already owns the mutex, exclusively or not. More... | |
| void | unlock () |
| Unlocks the mutex locked for exclusive ownership. | |
| void | lock_shared () |
| Locks mutex for shared ownership. Use unlock_shared to unlock the mutex. The mutex is also automatically unlocked on destruction. | |
| bool | try_lock_shared () |
| Tries to gain shared ownership of the mutex and returns false, if another thread already owns the mutex, exclusively or not. More... | |
| void | unlock_shared () |
| Unlocks the mutex locked for shared ownership. | |
An implementation of C++17 shared_mutex primitive for read-write lock. See C++17 shared_mutex and N2406.