#include <CircularBuffer.h>
template<typename T, size_t Size>
struct mpacklog::CircularBuffer< T, Size >
Lock-free, thread-safe, single-producer single-consumer circular buffer.
Loosely based off the article: https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular
Definition at line 38 of file CircularBuffer.h.
◆ anonymous enum
template<typename T , size_t Size>
◆ CircularBuffer()
template<typename T , size_t Size>
◆ empty()
template<typename T , size_t Size>
◆ pop()
template<typename T , size_t Size>
Pop next item from the buffer.
- Parameters
-
[out] | item | Popped item will be written there. |
- Returns
- True if an item was popped, false if the buffer is empty.
Definition at line 74 of file CircularBuffer.h.
◆ push()
template<typename T , size_t Size>
Push data to the buffer.
- Parameters
-
[in] | item | New item to push. |
- Returns
- True if the item was pushed, false if the buffer is full.
Definition at line 57 of file CircularBuffer.h.
◆ size()
template<typename T , size_t Size>
The documentation for this struct was generated from the following file: