try_transition_to_unique_lock overloads
Synopses
Declared in <folly/synchronization/Lock.h>
Immediately attempts to atomically upgrade a shared lock to an exclusive lock.
template<typename Mutex>
unique_lock<Mutex>
try_transition_to_unique_lock(shared_lock<Mutex>& lock);
Immediately attempts to atomically upgrade an upgrade lock to an exclusive lock.
template<typename Mutex>
unique_lock<Mutex>
try_transition_to_unique_lock(upgrade_lock<Mutex>& lock);
Return Value
An exclusive lock holder; empty if the attempt failed.
Parameters
Name |
Description |
lock |
The shared lock holder to transition from. |
Created with MrDocs