proxygen
folly::SpinLock Class Reference

#include <SpinLock.h>

Public Member Functions

FOLLY_ALWAYS_INLINE SpinLock () noexcept
 
FOLLY_ALWAYS_INLINE void lock () const noexcept
 
FOLLY_ALWAYS_INLINE void unlock () const noexcept
 
FOLLY_ALWAYS_INLINE bool try_lock () const noexcept
 

Private Attributes

folly::MicroSpinLock lock_
 

Detailed Description

Definition at line 44 of file SpinLock.h.

Constructor & Destructor Documentation

FOLLY_ALWAYS_INLINE folly::SpinLock::SpinLock ( )
inlinenoexcept

Definition at line 46 of file SpinLock.h.

References folly::MicroSpinLock::init(), and lock_.

46  {
47  lock_.init();
48  }
folly::MicroSpinLock lock_
Definition: SpinLock.h:60
void init() noexcept
Definition: MicroSpinLock.h:72

Member Function Documentation

FOLLY_ALWAYS_INLINE void folly::SpinLock::lock ( ) const
inlinenoexcept

Definition at line 49 of file SpinLock.h.

References folly::MicroSpinLock::lock(), and lock_.

Referenced by folly::ssl::detail::isSSLLockDisabled().

49  {
50  lock_.lock();
51  }
folly::MicroSpinLock lock_
Definition: SpinLock.h:60
void lock() noexcept
Definition: MicroSpinLock.h:80
FOLLY_ALWAYS_INLINE bool folly::SpinLock::try_lock ( ) const
inlinenoexcept

Definition at line 55 of file SpinLock.h.

References lock_, and folly::MicroSpinLock::try_lock().

Referenced by folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::checkQueueSize().

55  {
56  return lock_.try_lock();
57  }
folly::MicroSpinLock lock_
Definition: SpinLock.h:60
bool try_lock() noexcept
Definition: MicroSpinLock.h:76
FOLLY_ALWAYS_INLINE void folly::SpinLock::unlock ( ) const
inlinenoexcept

Member Data Documentation


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