Tries to acquire the managed mutex in shared mode within a duration.
Declared in <folly/SharedMutex.h>
template<
typename Rep,
typename Period>
bool
try_lock_for(std::chrono::duration<Rep, Period> const& timeout);
true if the lock was acquired before the duration elapsed.
| Name | Description |
|---|---|
| timeout | Maximum time to wait for the lock. |