12#ifndef ROC_PACKET_CONCURRENT_QUEUE_H_
13#define ROC_PACKET_CONCURRENT_QUEUE_H_
19#include "roc_core/semaphore.h"
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Base class for non-copyable objects.
Concurrent blocking packet queue.
virtual status::StatusCode read(PacketPtr &)
Read next packet. If reads are not concurrent, and queue is non-blocking, then reads are wait-free....
ConcurrentQueue(Mode mode)
Initialize. mode defines whether reads will be blocking.
@ NonBlocking
Read operation returns null if queue is empty.
@ Blocking
Read operation blocks until queue is non-empty.
virtual status::StatusCode write(const PacketPtr &packet)
Add packet to the queue. Wait-free operation.
Multi-producer single-consumer queue.
Optionally constructed object.