Signbit MPSCQ  0.5.0
Classes | Public Member Functions | List of all members
sbit::mpscq::Queue Class Reference

#include <mpscq.h>

Classes

struct  Envelope
 
struct  Message
 

Public Member Functions

void append (Envelope *elem)
 
EnvelopeflushAll ()
 

Detailed Description

Multiple-producer Single-Consumer Queue

Messages wrapped in (prepended by) Envelopes are appended by multiple producers and popped in batches by a single consumer.

This implementation is lock-free.

Member Function Documentation

◆ append()

void sbit::mpscq::Queue::append ( Envelope elem)
inline

Appends this object to the queue

Parameters
elemis the new element

◆ flushAll()

Envelope* sbit::mpscq::Queue::flushAll ( )
inline

Atomically removes and returns all elements from the queue

Returns
the entire contents of the queue

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