arduino-audio-tools
|
A simple single producer, single consumer lock free queue. More...
#include <QueueLockFree.h>
Classes | |
struct | Node |
Public Member Functions | |
QueueLockFree (size_t capacity, Allocator &allocator=DefaultAllocator) | |
size_t | capacity () const |
void | clear () |
bool | dequeue (T &result) |
bool | empty () |
bool | enqueue (const T &&data) |
bool | enqueue (const T &data) |
void | resize (size_t capacity) |
void | setAllocator (Allocator &allocator) |
size_t | size () const |
Protected Attributes | |
size_t | capacity_mask |
size_t | capacity_value |
std::atomic< size_t > | head_pos |
Node * | p_node = nullptr |
std::atomic< size_t > | tail_pos |
Vector< Node > | vector |
A simple single producer, single consumer lock free queue.