arduino-audio-tools
Classes | Public Member Functions | Protected Attributes | List of all members
QueueLockFree< T > Class Template Reference

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 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
 
Nodep_node
 
std::atomic< size_t > tail_pos
 
Vector< Nodevector
 

Detailed Description

template<typename T>
class audio_tools::QueueLockFree< T >

A simple single producer, single consumer lock free queue.


The documentation for this class was generated from the following file: