proxygen
folly::LockPolicyTryUpgrade Struct Reference

#include <LockTraits.h>

Inheritance diagram for folly::LockPolicyTryUpgrade:
folly::detail::UnlockPolicyUpgrade< LockTraits >

Public Types

using UnlockPolicy = detail::UnlockPolicyUpgrade< LockTraits >
 

Static Public Member Functions

template<class Mutex >
static bool lock (Mutex &mutex)
 
- Static Public Member Functions inherited from folly::detail::UnlockPolicyUpgrade< LockTraits >
template<typename Mutex >
static void unlock (Mutex &mutex)
 

Detailed Description

A lock policy that tries to acquire an upgrade lock and returns true or false based on whether the lock operation succeeds

Definition at line 560 of file LockTraits.h.

Member Typedef Documentation

Member Function Documentation

template<class Mutex >
static bool folly::LockPolicyTryUpgrade::lock ( Mutex mutex)
inlinestatic

Definition at line 564 of file LockTraits.h.

564  {
565  return LockTraits<Mutex>::try_lock_upgrade(mutex);
566  }
std::mutex mutex

The documentation for this struct was generated from the following file: