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

WeakAtomic< ssize_tcount_
 
Semaphore sema_
 

Detailed Description

Definition at line 634 of file atomicops.h.

Member Typedef Documentation

◆ ssize_t

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

◆ LightweightSemaphore()

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

Definition at line 687 of file atomicops.h.

Member Function Documentation

◆ availableApprox()

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

Definition at line 724 of file atomicops.h.

◆ signal()

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

Definition at line 713 of file atomicops.h.

◆ tryWait()

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

Definition at line 692 of file atomicops.h.

◆ wait() [1/2]

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

Definition at line 702 of file atomicops.h.

◆ wait() [2/2]

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

Definition at line 708 of file atomicops.h.

◆ waitWithPartialSpinning()

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

Definition at line 643 of file atomicops.h.

Member Data Documentation

◆ count_

WeakAtomic<ssize_t> moodycamel::spsc_sema::LightweightSemaphore::count_
private

Definition at line 640 of file atomicops.h.

◆ sema_

Semaphore moodycamel::spsc_sema::LightweightSemaphore::sema_
private

Definition at line 641 of file atomicops.h.


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


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Tue Jul 4 2023 02:09:47