Attempts an atomic transition from the from‐lock to the to‐lock, without waiting if the transition is not immediately available.
Synopsis
Declared in <folly/synchronization/Lock.h>
template<
template<typename> typename ToLock,
typename Mutex,
template<typename> typename FromLock>
ToLock<Mutex>
try_transition_lock(FromLock<Mutex>& lock);
Return Value
A lock holder of the target lock type; empty if the attempt failed.
Parameters
Name |
Description |
lock |
The lock holder to transition from. |
Created with MrDocs