Immediately attempts to atomically upgrade an upgrade lock to an exclusive lock.

Synopsis

Declared in <folly/synchronization/Lock.h>

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 upgrade lock holder to transition from.

Created with MrDocs