|
|
| wfree_fifo (wfree_fifo const &)=delete |
| |
|
| wfree_fifo (wfree_fifo &&)=delete |
| |
|
wfree_fifo & | operator= (wfree_fifo const &)=delete |
| |
|
wfree_fifo & | operator= (wfree_fifo &&)=delete |
| |
| bool | empty () const noexcept |
| | Check if fifo is empty.
|
| |
| template<typename Func > |
| auto | take_one (Func &&func) noexcept |
| | Take one message from the fifo slot.
|
| |
| template<typename Operation > |
| void | take_all (Operation const &operation) noexcept |
| | Take all message from the queue.
|
| |
| template<typename Message , typename Func , typename... Args> |
| hi_force_inline auto | emplace_and_invoke (Func &&func, Args &&...args) noexcept |
| | Create an message in-place on the fifo.
|
| |
|
template<typename Func , typename Object > |
| hi_force_inline auto | insert_and_invoke (Func &&func, Object &&object) noexcept |
| |
|
template<typename Message , typename... Args> |
| hi_force_inline void | emplace (Args &&...args) noexcept |
| |
|
template<typename Object > |
| hi_force_inline void | insert (Object &&object) noexcept |
| |
template<typename T,
std::size_t SlotSize>
class v1::wfree_fifo< T, SlotSize >
A wait-free multiple-producer/single-consumer fifo designed for absolute performance.
Because of performance reasons the ring-buffer is 64kByte. Each slot in the ring buffer consists of a pointer and a byte buffer for storage.
The number of slots in the ring-buffer is dictated by the size of each slot and the ring-buffer size.
- Template Parameters
-
| T | Base class of the value type stored in the ring buffer. |
| SlotSize | Size of each slot, must be power-of-two. |