|
| function_fifo (function_fifo const &)=delete |
|
| function_fifo (function_fifo &&)=delete |
|
function_fifo & | operator= (function_fifo const &)=delete |
|
function_fifo & | operator= (function_fifo &&)=delete |
|
bool | empty () const noexcept |
| Check if there are not functions added to the fifo.
|
|
template<typename... Args> |
auto | run_one (Args const &...args) noexcept |
| Run one of the function that was posted or send.
|
|
void | run_all () noexcept |
| Run all the functions posted or send on the fifo.
|
|
template<typename Func > |
void | add_function (Func &&func) noexcept |
| Asynchronously post a functor to the fifo to be executed later.
|
|
template<typename Func , typename... Args>
requires (std::is_invocable_v<std::decay_t<Func>, std::decay_t<Args>...>) |
auto | add_async_function (Func &&func, Args &&...args) noexcept |
| Asynchronously send a functor to the fifo to be executed later.
|
|
template<typename Proto = void(),
std::size_t SlotSize = 64>
class v1::function_fifo< Proto, SlotSize >
A fifo (First-in, Firts-out) for asynchronous calls.
This fifo is used to handle asynchronous calls from an event-loop.
- Template Parameters
-
Proto | The std::function prototype. |
SlotSize | The size in bytes of each slot. This determines the maximum number of functions that can be stored on the fifo and if functions can be completely stored on the fifo or are allocated on the heap. |