proxygen
folly::LockPolicyTryShared Struct Reference

#include <LockTraits.h>

Inheritance diagram for folly::LockPolicyTryShared:
folly::detail::UnlockPolicyShared< LockTraits >

Public Types

using UnlockPolicy = detail::UnlockPolicyShared< LockTraits >
 

Static Public Member Functions

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

Detailed Description

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

Definition at line 547 of file LockTraits.h.

Member Typedef Documentation

Member Function Documentation

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

Definition at line 551 of file LockTraits.h.

551  {
552  return LockTraits<Mutex>::try_lock_shared(mutex);
553  }
std::mutex mutex

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