9 #ifndef CPPCOMMON_THREADS_MPSC_LINKED_BATCHER_H
10 #define CPPCOMMON_THREADS_MPSC_LINKED_BATCHER_H
74 bool Dequeue(
const std::function<
void(
const T&)>& handler = [](
const int&){});
83 std::atomic<Node*> _head;
Multiple producers / single consumer wait-free linked batcher.
MPSCLinkedBatcher(const MPSCLinkedBatcher &)=delete
bool Dequeue(const std::function< void(const T &)> &handler=[](const int &){})
Dequeue all items from the linked queue (single consumer thread method)
MPSCLinkedBatcher & operator=(const MPSCLinkedBatcher &)=delete
bool Enqueue(const T &item)
Enqueue an item into the linked batcher (multiple producers threads method)
MPSCLinkedBatcher(MPSCLinkedBatcher &&)=delete
MPSCLinkedBatcher & operator=(MPSCLinkedBatcher &&)=delete
Multiple producers / single consumer wait-free linked batcher inline implementation.
C++ Common project definitions.