12#ifndef ROC_CORE_MPSC_QUEUE_H_
13#define ROC_CORE_MPSC_QUEUE_H_
15#include "roc_core/atomic_ops.h"
39template <
class T,
template <
class TT>
class OwnershipPolicy = RefCountedOwnership>
Multi-producer single-consumer queue internal implementation class.
void push_back(MpscQueueNode::MpscQueueData *node)
Add object to the end of the queue.
MpscQueueNode::MpscQueueData * pop_front(bool can_spin)
Remove object from the beginning of the queue.
Thread-safe lock-free node-based intrusive multi-producer single-consumer queue.
void push_back(T &obj)
Add object to the end of the queue. Can be called concurrently. Acquires ownership of obj....
Pointer pop_front_exclusive()
Remove object from the beginning of the queue (blocking version). Should NOT be called concurrently....
Pointer try_pop_front_exclusive()
Try to remove object from the beginning of the queue (non-blocking version). Should NOT be called con...
OwnershipPolicy< T >::Pointer Pointer
Pointer type.
Base class for non-copyable objects.
Shared ownership intrusive pointer.
Multi-producer single-consumer queue internal implementation.
MpscQueueNode * container_of()
Get MpscQueueNode object that contains this ListData object.