std::shared_lock<folly::SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>>::shared_lock

Constructs a lock and tries to acquire the mutex without blocking.

Synopsis

Declared in <folly/SharedMutex.h>

[[nodiscard]]
shared_lock(
    mutex_type& mutex,
    std::try_to_lock_t unused);

Return Value

NOTE

The return value should not be discarded.

Parameters

NameDescription
mutexMutex to try to lock.
unusedTag selecting try-to-lock.