class template
std::shared_lock
- Header
<shared_mutex>- Scope
std- cppreference
- std::shared_lock
Synopsis
template<class Mutex>
class shared_lock;Member types
| Name | Declaration |
|---|---|
mutex_typetype alias · member type | = Mutex |
Member functions
| Name | Declaration |
|---|---|
shared_lockconstructor · 9 overloads | shared_lock() +8 more |
~shared_lockdestructor | ~shared_lock() |
operator=operator · 2 overloads | shared_lock& operator=(const shared_lock& other) +1 more |
lockmember function | void lock() |
mutexmember function | mutex_type* mutex() const |
owns_lockmember function | bool owns_lock() const |
releasemember function | mutex_type* release() |
swapmember function | void swap(shared_lock& u) |
try_lockmember function | bool try_lock() |
try_lock_formember function template | bool try_lock_for(const chrono::duration<Rep, Period>& rel_time) |
try_lock_untilmember function template | bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time) |
unlockmember function | void unlock() |
operator boolconversion function | operator bool() const |