A shared mutex wrapper that supports timed lock operations and non-exclusive sharing by multiple threads.
More...
|
| shared_lock (mutex_type &__m) |
| Creates a shared_lock instance and locks the associated mutex. More...
|
|
| shared_lock (mutex_type &__m, defer_lock_t) noexcept |
| Creates a shared_lock instance and does not lock the associated mutex. More...
|
|
| shared_lock (mutex_type &__m, try_to_lock_t) |
| Creates a shared_lock instance and tries to lock the associated mutex without blocking. More...
|
|
| shared_lock (mutex_type &__m, adopt_lock_t) |
| Creates a shared_lock instance and assumes that the calling thread already owns the associated mutex. More...
|
|
template<typename _Clock , typename _Duration > |
| shared_lock (mutex_type &__m, const chrono::time_point< _Clock, _Duration > &__abs_time) |
| Creates a shared_lock instance and tries to lock the associated mutex until the specified absolute time has passed. More...
|
|
template<typename _Rep , typename _Period > |
| shared_lock (mutex_type &__m, const chrono::duration< _Rep, _Period > &__rel_time) |
| Creates a shared_lock instance and tries to lock the associated mutex until the specified duration has passed. More...
|
|
| shared_lock (shared_lock const &)=delete |
|
shared_lock & | operator= (shared_lock const &)=delete |
|
| shared_lock (shared_lock &&__sl) noexcept |
| Creates a shared_lock instance based on the other shared lock. More...
|
|
shared_lock & | operator= (shared_lock &&__sl) noexcept |
| The default move assignment operator. More...
|
|
void | lock () |
| Takes ownership of the associated mutex. More...
|
|
bool | try_lock () |
| Tries to take ownership of the mutex without blocking. More...
|
|
template<typename _Rep , typename _Period > |
bool | try_lock_for (const chrono::duration< _Rep, _Period > &__rel_time) |
| Tries to take shared ownership of the mutex and blocks it until the specified time elapses. More...
|
|
template<typename _Clock , typename _Duration > |
bool | try_lock_until (const chrono::time_point< _Clock, _Duration > &__abs_time) |
| Tries to take shared ownership of the mutex and blocks it until the absolute time has passed. More...
|
|
void | unlock () |
| Releases the ownership of the mutex from the calling thread. More...
|
|
void | swap (shared_lock &__u) noexcept |
| Exchanges the data members of two shared_lock instances. More...
|
|
mutex_type * | release () noexcept |
| Disassociates the mutex without unlocking. More...
|
|
bool | owns_lock () const noexcept |
| Checks whether the lock owns its associated mutex. More...
|
|
| operator bool () const noexcept |
| Checks whether the lock owns its associated mutex. More...
|
|
mutex_type * | mutex () const noexcept |
| Gets a pointer to the associated mutex. More...
|
|
template<typename Mutex>
class std::shared_lock< Mutex >
A shared mutex wrapper that supports timed lock operations and non-exclusive sharing by multiple threads.