proxygen
folly::LockPolicyTryExclusive Struct Reference

#include <LockTraits.h>

Inheritance diagram for folly::LockPolicyTryExclusive:
folly::detail::UnlockPolicyExclusive< LockTraits >

Public Types

using UnlockPolicy = detail::UnlockPolicyExclusive< LockTraits >
 

Static Public Member Functions

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

Detailed Description

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

Definition at line 534 of file LockTraits.h.

Member Typedef Documentation

Member Function Documentation

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

Definition at line 538 of file LockTraits.h.

538  {
539  return LockTraits<Mutex>::try_lock(mutex);
540  }
std::mutex mutex

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