try_transition_to_unique_lock_for overloads
Declared in <folly/synchronization/Lock.h>
Attempts, up to a timeout, to atomically upgrade a shared lock to an exclusive lock.
template<
typename Mutex,
typename Rep,
typename Period>
unique_lock<Mutex>
try_transition_to_unique_lock_for(
shared_lock<Mutex>& lock,
std::chrono::duration<Rep, Period> const& timeout);
» more...
Attempts, up to a timeout, to atomically upgrade an upgrade lock to an exclusive lock.
template<
typename Mutex,
typename Rep,
typename Period>
unique_lock<Mutex>
try_transition_to_unique_lock_for(
upgrade_lock<Mutex>& lock,
std::chrono::duration<Rep, Period> const& timeout);
» more...
An exclusive lock holder; empty if the attempt failed.
| Name | Description |
|---|---|
| lock | The shared lock holder to transition from. |
| timeout | The maximum duration to wait for. |