Constructs a lock and tries to acquire the mutex by a deadline.
Declared in <folly/SharedMutex.h>
template<
typename Clock,
typename Duration>
[[nodiscard]]
shared_lock(
mutex_type& mutex,
std::chrono::time_point<Clock, Duration> const& deadline);
The return value should not be discarded.
| Name | Description |
|---|---|
| mutex | Mutex to try to lock. |
| deadline | Absolute time by which the lock must be acquired. |