Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE > Class Template Reference

#include <readerwriterqueue.h>

Public Member Functions

 BlockingReaderWriterQueue (BlockingReaderWriterQueue &&other) AE_NO_TSAN
 
 BlockingReaderWriterQueue (size_t size=15) AE_NO_TSAN
 
AE_FORCEINLINE bool enqueue (T &&element) AE_NO_TSAN
 
AE_FORCEINLINE bool enqueue (T const &element) AE_NO_TSAN
 
AE_FORCEINLINE size_t max_capacity () const
 
BlockingReaderWriterQueueoperator= (BlockingReaderWriterQueue &&other) AE_NO_TSAN
 
AE_FORCEINLINE T * peek () const AE_NO_TSAN
 
AE_FORCEINLINE bool pop () AE_NO_TSAN
 
AE_FORCEINLINE size_t size_approx () const AE_NO_TSAN
 
template<typename U >
bool try_dequeue (U &result) AE_NO_TSAN
 
AE_FORCEINLINE bool try_enqueue (T &&element) AE_NO_TSAN
 
AE_FORCEINLINE bool try_enqueue (T const &element) AE_NO_TSAN
 
template<typename U >
void wait_dequeue (U &result) AE_NO_TSAN
 
template<typename U >
bool wait_dequeue_timed (U &result, std::int64_t timeout_usecs) AE_NO_TSAN
 

Private Types

typedef ::moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE > ReaderWriterQueue
 

Private Member Functions

 BlockingReaderWriterQueue (BlockingReaderWriterQueue const &)
 
BlockingReaderWriterQueueoperator= (BlockingReaderWriterQueue const &)
 

Private Attributes

ReaderWriterQueue inner
 
std::unique_ptr< spsc_sema::LightweightSemaphoresema
 

Detailed Description

template<typename T, size_t MAX_BLOCK_SIZE = 512>
class moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >

Definition at line 791 of file readerwriterqueue.h.

Member Typedef Documentation

◆ ReaderWriterQueue

template<typename T , size_t MAX_BLOCK_SIZE = 512>
typedef ::moodycamel::ReaderWriterQueue<T, MAX_BLOCK_SIZE> moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::ReaderWriterQueue
private

Definition at line 794 of file readerwriterqueue.h.

Constructor & Destructor Documentation

◆ BlockingReaderWriterQueue() [1/3]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::BlockingReaderWriterQueue ( size_t  size = 15)
inlineexplicit

Definition at line 797 of file readerwriterqueue.h.

◆ BlockingReaderWriterQueue() [2/3]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::BlockingReaderWriterQueue ( BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE > &&  other)
inline

Definition at line 802 of file readerwriterqueue.h.

◆ BlockingReaderWriterQueue() [3/3]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::BlockingReaderWriterQueue ( BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE > const &  )
inlineprivate

Definition at line 977 of file readerwriterqueue.h.

Member Function Documentation

◆ enqueue() [1/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue ( T &&  element)
inline

Definition at line 856 of file readerwriterqueue.h.

◆ enqueue() [2/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue ( T const &  element)
inline

Definition at line 843 of file readerwriterqueue.h.

◆ max_capacity()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE size_t moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::max_capacity ( ) const
inline

Definition at line 970 of file readerwriterqueue.h.

◆ operator=() [1/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
BlockingReaderWriterQueue& moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::operator= ( BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE > &&  other)
inline

Definition at line 807 of file readerwriterqueue.h.

◆ operator=() [2/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
BlockingReaderWriterQueue& moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::operator= ( BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE > const &  )
inlineprivate

Definition at line 980 of file readerwriterqueue.h.

◆ peek()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE T* moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::peek ( ) const
inline

Definition at line 934 of file readerwriterqueue.h.

◆ pop()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::pop ( )
inline

Definition at line 942 of file readerwriterqueue.h.

◆ size_approx()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE size_t moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::size_approx ( ) const
inline

Definition at line 956 of file readerwriterqueue.h.

◆ try_dequeue()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename U >
bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_dequeue ( U &  result)
inline

Definition at line 870 of file readerwriterqueue.h.

◆ try_enqueue() [1/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue ( T &&  element)
inline

Definition at line 830 of file readerwriterqueue.h.

◆ try_enqueue() [2/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue ( T const &  element)
inline

Definition at line 817 of file readerwriterqueue.h.

◆ wait_dequeue()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename U >
void moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::wait_dequeue ( U &  result)
inline

Definition at line 885 of file readerwriterqueue.h.

◆ wait_dequeue_timed()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename U >
bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::wait_dequeue_timed ( U &  result,
std::int64_t  timeout_usecs 
)
inline

Definition at line 902 of file readerwriterqueue.h.

Member Data Documentation

◆ inner

template<typename T , size_t MAX_BLOCK_SIZE = 512>
ReaderWriterQueue moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::inner
private

Definition at line 985 of file readerwriterqueue.h.

◆ sema

template<typename T , size_t MAX_BLOCK_SIZE = 512>
std::unique_ptr<spsc_sema::LightweightSemaphore> moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::sema
private

Definition at line 986 of file readerwriterqueue.h.


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


pf_driver
Author(s): Harsh Deshpande
autogenerated on Sun Feb 4 2024 03:32:56