Attempts, up to a deadline, to atomically upgrade a shared lock to an upgrade lock.

Synopsis

Declared in <folly/synchronization/Lock.h>

template<
    typename Mutex,
    typename Clock,
    typename Duration>
upgrade_lock<Mutex>
try_transition_to_upgrade_lock_until(
    shared_lock<Mutex>& lock,
    std::chrono::time_point<Clock, Duration> const& deadline);

Return Value

An upgrade lock holder; empty if the attempt failed.

Parameters

Name

Description

lock

The shared lock holder to transition from.

deadline

The time point past which to stop waiting.

Created with MrDocs