Double buffered, threadsafe queue for MPSC (multi-producer, single-consumer) comms.
More...
#include <DBQueue.h>
|
| DBQueue () |
|
void | Swap () |
| Clears foreground queue and swaps queues.
|
|
void | Push (const T &item) |
| Pushes to the background queue. Copy constructor.
|
|
void | Push (T &&item) |
| Pushes to the background queue. Move constructor.
|
|
T & | Front () |
| Returns a reference to the front element in the foregrund queue.
|
|
const T & | Front () const |
|
void | Pop () |
| Pops from the foreground queue.
|
|
T | FrontAndPop () |
| Return the front element in the foreground queue by moving it and erase it from the queue.
|
|
bool | Empty () const |
| Reports whether the foreground queue is empty.
|
|
bool | BothEmpty () const |
| Reports whether the both queues are empty.
|
|
size_t | Size () const |
| Reports the size of the foreground queue.
|
|
void | Clear () |
| Clears foreground and background.
|
|
template<class T>
class eprosima::fastrtps::DBQueue< T >
Double buffered, threadsafe queue for MPSC (multi-producer, single-consumer) comms.
◆ DBQueue()
◆ BothEmpty()
Reports whether the both queues are empty.
◆ Clear()
Clears foreground and background.
◆ Empty()
Reports whether the foreground queue is empty.
◆ Front() [1/2]
Returns a reference to the front element in the foregrund queue.
◆ Front() [2/2]
template<class T >
const T & Front |
( |
| ) |
const |
|
inline |
◆ FrontAndPop()
Return the front element in the foreground queue by moving it and erase it from the queue.
◆ Pop()
Pops from the foreground queue.
◆ Push() [1/2]
template<class T >
void Push |
( |
const T & |
item | ) |
|
|
inline |
Pushes to the background queue. Copy constructor.
◆ Push() [2/2]
Pushes to the background queue. Move constructor.
◆ Size()
Reports the size of the foreground queue.
◆ Swap()
Clears foreground queue and swaps queues.
The documentation for this class was generated from the following file: