9 #ifndef CPPCOMMON_THREADS_MPSC_LINKED_QUEUE_H
10 #define CPPCOMMON_THREADS_MPSC_LINKED_QUEUE_H
78 std::atomic<Node*> next;
82 typedef char cache_line_pad[128];
85 std::atomic<Node*> _head;
87 std::atomic<Node*> _tail;
Multiple producers / single consumer wait-free linked queue.
bool Enqueue(const T &item)
Enqueue an item into the linked queue (multiple producers threads method)
bool Dequeue(T &item)
Dequeue an item from the linked queue (single consumer thread method)
MPSCLinkedQueue & operator=(MPSCLinkedQueue &&)=delete
MPSCLinkedQueue(const MPSCLinkedQueue &)=delete
MPSCLinkedQueue(MPSCLinkedQueue &&)=delete
MPSCLinkedQueue & operator=(const MPSCLinkedQueue &)=delete
Multiple producers / single consumer wait-free linked queue inline implementation.
C++ Common project definitions.