moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE > Class Template Reference

`#include <readerwriterqueue.h>`

## Public Member Functions

| BlockingReaderWriterQueue (size_t maxSize=15)
AE_FORCEINLINE bool | try_enqueue (T const &element)
AE_FORCEINLINE bool | try_enqueue (T &&element)
AE_FORCEINLINE bool | enqueue (T const &element)
AE_FORCEINLINE bool | enqueue (T &&element)
template<typename U >
bool | try_dequeue (U &result)
template<typename U >
void | wait_dequeue (U &result)
AE_FORCEINLINE T * | peek ()
AE_FORCEINLINE bool | pop ()
AE_FORCEINLINE size_t | size_approx () const

## Constructor & Destructor Documentation

## BlockingReaderWriterQueue()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::BlockingReaderWriterQueue | ( | size_t | maxSize = `15` | ) |

inlineexplicit

## 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

References moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue(), and moodycamel::spsc_sema::LightweightSemaphore::signal().

## 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

References moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue(), and moodycamel::spsc_sema::LightweightSemaphore::signal().

## peek()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

AE_FORCEINLINE T * moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::peek | ( |  | ) |

inline

References moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::peek().

## pop()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

AE_FORCEINLINE bool moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::pop | ( |  | ) |

inline

References AE_UNUSED, moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::pop(), and moodycamel::spsc_sema::LightweightSemaphore::tryWait().

## 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

References moodycamel::spsc_sema::LightweightSemaphore::availableApprox().

## 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

References AE_UNUSED, moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_dequeue(), and moodycamel::spsc_sema::LightweightSemaphore::tryWait().

## 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

References moodycamel::spsc_sema::LightweightSemaphore::signal(), and moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue().

## 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

References moodycamel::spsc_sema::LightweightSemaphore::signal(), and moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue().

## 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

References AE_UNUSED, moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_dequeue(), and moodycamel::spsc_sema::LightweightSemaphore::wait().

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

- readerwriterqueue.h