std::shared_lock specialization for folly::SharedMutexImpl.
Synopsis
Declared in <folly/SharedMutex.h>
template<
bool ReaderPriority,
typename Tag_,
template<typename> typename Atom,
typename Policy>
class shared_lock<folly::SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>>;
Description
Uses the tokenful version of unlock_shared for faster unlocking by carrying a token that records where the shared lock was taken.
Type Aliases
Name |
Description |
The mutex type this lock manages. |
|
The token type used to record the shared lock. |
Member Functions
Name |
Description |
|
Constructors |
|
Releases the shared lock if it is held. |
Assignment operators |
|
Acquires the managed mutex in shared mode. |
|
Returns the managed mutex without releasing ownership. |
|
Reports whether this lock currently owns a shared lock. |
|
Releases ownership of the managed mutex without unlocking it. |
|
Swaps the managed mutex and token with another lock. |
|
Tries to acquire the managed mutex in shared mode without blocking. |
|
Tries to acquire the managed mutex in shared mode within a duration. |
|
Tries to acquire the managed mutex in shared mode by a deadline. |
|
Releases the managed shared lock. |
|
Reports whether this lock currently owns a shared lock. |
Template Parameters
Name |
Description |
ReaderPriority |
Whether the mutex gives priority to readers. |
Tag_ |
Tag type of the mutex instantiation. |
Atom |
Atomic template used by the mutex. |
Policy |
Policy type of the mutex. |
Created with MrDocs