proxygen
folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false > Struct Template Reference

#include <LockTraits.h>

Inheritance diagram for folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >:
folly::detail::LockTraitsImpl< Mutex, MutexLevel::SHARED, false > folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, true > folly::detail::LockTraitsImpl< Mutex, MutexLevel::SHARED, true > folly::detail::LockTraitsImpl< Mutex, MutexLevel::UPGRADE, false > folly::detail::LockTraitsImpl< Mutex, MutexLevel::SHARED, true > folly::detail::LockTraitsImpl< Mutex, MutexLevel::UPGRADE, true > folly::detail::LockTraitsImpl< Mutex, MutexLevel::UPGRADE, true > folly::detail::LockTraitsImpl< Mutex, MutexLevel::UPGRADE, true >

Static Public Member Functions

static void lock (Mutex &mutex)
 
static void unlock (Mutex &mutex)
 
static bool try_lock (Mutex &mutex)
 

Static Public Attributes

static constexpr bool is_timed {false}
 
static constexpr bool is_shared {false}
 
static constexpr bool is_upgrade {false}
 

Detailed Description

template<class Mutex>
struct folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >

Definition at line 115 of file LockTraits.h.

Member Function Documentation

template<class Mutex >
static void folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >::lock ( Mutex mutex)
inlinestatic

Acquire the lock exclusively.

Definition at line 123 of file LockTraits.h.

123  {
124  mutex.lock();
125  }
std::mutex mutex
template<class Mutex >
static bool folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >::try_lock ( Mutex mutex)
inlinestatic

Try to acquire the mutex

Definition at line 137 of file LockTraits.h.

137  {
138  return mutex.try_lock();
139  }
std::mutex mutex
template<class Mutex >
static void folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >::unlock ( Mutex mutex)
inlinestatic

Release an exclusively-held lock.

Definition at line 130 of file LockTraits.h.

130  {
131  mutex.unlock();
132  }
std::mutex mutex

Member Data Documentation

template<class Mutex >
constexpr bool folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >::is_shared {false}
static

Definition at line 117 of file LockTraits.h.

template<class Mutex >
constexpr bool folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >::is_timed {false}
static

Definition at line 116 of file LockTraits.h.

template<class Mutex >
constexpr bool folly::detail::LockTraitsImpl< Mutex, MutexLevel::UNIQUE, false >::is_upgrade {false}
static

Definition at line 118 of file LockTraits.h.


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