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

`#include <readerwriterqueue.h>`

## Public Member Functions

| ReaderWriterQueue (size_t maxSize=15)
| ~ReaderWriterQueue ()
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)
T * | peek ()
bool | pop ()
size_t | size_approx () const

## Constructor & Destructor Documentation

## ReaderWriterQueue()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

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

inlineexplicit

References moodycamel::fence(), and moodycamel::memory_order_sync.

## ~ReaderWriterQueue()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::~ReaderWriterQueue | ( |  | ) |

inline

References moodycamel::fence(), and moodycamel::memory_order_sync.

## Member Function Documentation

## enqueue() [1/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>

AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue | ( | T && | element | ) |

inline

## enqueue() [2/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>

AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue | ( | T const & | element | ) |

inline

Referenced by moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue().

## peek()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

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

inline

References moodycamel::fence(), moodycamel::weak_atomic< T >::load(), and moodycamel::memory_order_acquire.

Referenced by moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::peek().

## pop()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

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

inline

References AE_UNUSED, moodycamel::compiler_fence(), moodycamel::fence(), moodycamel::weak_atomic< T >::load(), moodycamel::memory_order_acquire, and moodycamel::memory_order_release.

Referenced by moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::pop().

## size_approx()

template<typename T , size_t MAX_BLOCK_SIZE = 512>

size_t moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::size_approx | ( |  | ) | const

inline

References moodycamel::fence(), moodycamel::weak_atomic< T >::load(), and moodycamel::memory_order_acquire.

## try_dequeue()

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename U >

bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_dequeue | ( | U & | result | ) |

inline

References AE_UNUSED, moodycamel::compiler_fence(), moodycamel::fence(), moodycamel::weak_atomic< T >::load(), moodycamel::memory_order_acquire, and moodycamel::memory_order_release.

Referenced by moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_dequeue(), and moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::wait_dequeue().

## try_enqueue() [1/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>

AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue | ( | T && | element | ) |

inline

## try_enqueue() [2/2]

template<typename T , size_t MAX_BLOCK_SIZE = 512>

AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue | ( | T const & | element | ) |

inline

Referenced by moodycamel::BlockingReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue().

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

- readerwriterqueue.h