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

Constructs a lock and tries to acquire the mutex by a deadline.

Synopsis

Declared in <folly/SharedMutex.h>

template<
    typename Clock,
    typename Duration>
[[nodiscard]]
shared_lock(
    mutex_type& mutex,
    std::chrono::time_point<Clock, Duration> const& deadline);

Return Value

NOTE

The return value should not be discarded.

Parameters

NameDescription
mutexMutex to try to lock.
deadlineAbsolute time by which the lock must be acquired.