proxygen
folly::LockPolicyShared Struct Reference

#include <LockTraits.h>

Inheritance diagram for folly::LockPolicyShared:
folly::detail::UnlockPolicyShared< LockTraits > folly::LockPolicyFromExclusiveToShared folly::LockPolicyFromUpgradeToShared

Public Types

using UnlockPolicy = detail::UnlockPolicyShared< LockTraits >
 

Static Public Member Functions

template<class Mutex >
static std::true_type lock (Mutex &mutex)
 
template<class Mutex , class Rep , class Period >
static bool try_lock_for (Mutex &mutex, const std::chrono::duration< Rep, Period > &timeout)
 
- Static Public Member Functions inherited from folly::detail::UnlockPolicyShared< LockTraits >
template<typename Mutex >
static void unlock (Mutex &mutex)
 

Detailed Description

A lock policy that performs shared lock operations. This policy only works with shared mutex types.

Definition at line 488 of file LockTraits.h.

Member Typedef Documentation

Member Function Documentation

template<class Mutex >
static std::true_type folly::LockPolicyShared::lock ( Mutex mutex)
inlinestatic

Definition at line 492 of file LockTraits.h.

492  {
493  LockTraits<Mutex>::lock_shared(mutex);
494  return std::true_type{};
495  }
bool_constant< true > true_type
Definition: gtest-port.h:2210
std::mutex mutex
template<class Mutex , class Rep , class Period >
static bool folly::LockPolicyShared::try_lock_for ( Mutex mutex,
const std::chrono::duration< Rep, Period > &  timeout 
)
inlinestatic

Definition at line 497 of file LockTraits.h.

499  {
500  return LockTraits<Mutex>::try_lock_shared_for(mutex, timeout);
501  }
std::mutex mutex

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