Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
moodycamel::spsc_sema::LightweightSemaphore Class Reference

#include <atomicops.h>

Public Types

typedef std::make_signed< std::size_t >::type ssize_t
 

Public Member Functions

ssize_t availableApprox () const
 
 LightweightSemaphore (ssize_t initialCount=0)
 
void signal (ssize_t count=1)
 
bool tryWait ()
 
void wait ()
 
bool wait (std::int64_t timeout_usecs)
 

Private Member Functions

bool waitWithPartialSpinning (std::int64_t timeout_usecs=-1)
 

Private Attributes

weak_atomic< ssize_tm_count
 
Semaphore m_sema
 

Detailed Description

Definition at line 634 of file atomicops.h.

Member Typedef Documentation

typedef std::make_signed<std::size_t>::type moodycamel::spsc_sema::LightweightSemaphore::ssize_t

Definition at line 637 of file atomicops.h.

Constructor & Destructor Documentation

moodycamel::spsc_sema::LightweightSemaphore::LightweightSemaphore ( ssize_t  initialCount = 0)
inline

Definition at line 687 of file atomicops.h.

Member Function Documentation

ssize_t moodycamel::spsc_sema::LightweightSemaphore::availableApprox ( ) const
inline

Definition at line 724 of file atomicops.h.

void moodycamel::spsc_sema::LightweightSemaphore::signal ( ssize_t  count = 1)
inline

Definition at line 713 of file atomicops.h.

bool moodycamel::spsc_sema::LightweightSemaphore::tryWait ( )
inline

Definition at line 692 of file atomicops.h.

void moodycamel::spsc_sema::LightweightSemaphore::wait ( )
inline

Definition at line 702 of file atomicops.h.

bool moodycamel::spsc_sema::LightweightSemaphore::wait ( std::int64_t  timeout_usecs)
inline

Definition at line 708 of file atomicops.h.

bool moodycamel::spsc_sema::LightweightSemaphore::waitWithPartialSpinning ( std::int64_t  timeout_usecs = -1)
inlineprivate

Definition at line 643 of file atomicops.h.

Member Data Documentation

weak_atomic<ssize_t> moodycamel::spsc_sema::LightweightSemaphore::m_count
private

Definition at line 640 of file atomicops.h.

Semaphore moodycamel::spsc_sema::LightweightSemaphore::m_sema
private

Definition at line 641 of file atomicops.h.


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


ur_modern_driver
Author(s): Thomas Timm Andersen, Simon Rasmussen
autogenerated on Fri Jun 26 2020 03:37:01