27 #ifndef EMBB_CONTAINERS_WAIT_FREE_SPSC_QUEUE_H_ 28 #define EMBB_CONTAINERS_WAIT_FREE_SPSC_QUEUE_H_ 30 #include <embb/base/atomic.h> 107 namespace containers {
120 template<
typename Type,
class Allocator = embb::base::Allocator< Type > >
151 static size_t AlignCapacityToPowerOfTwo(
size_t capacity);
225 #include<embb/containers/internal/wait_free_spsc_queue-inl.h> 227 #endif // EMBB_CONTAINERS_WAIT_FREE_SPSC_QUEUE_H_ Definition: lock_free_mpmc_queue.h:40
~WaitFreeSPSCQueue()
Destroys the queue.
Wait-free queue for a single producer and a single consumer.
Definition: wait_free_spsc_queue.h:121
size_t GetCapacity()
Returns the capacity of the queue.
bool TryEnqueue(Type const &element)
Tries to enqueue an element into the queue.
bool TryDequeue(Type &element)
Tries to dequeue an element from the queue.
WaitFreeSPSCQueue(size_t capacity)
Creates a queue with at least the specified capacity.