![]() |
Lysa
0.0
Lysa 3D Engine
|
A buffer for tasks that need to be deferred and executed later.
Tasks are queued and processed at the start of the main loop.
Public Typedefs | |
| using | Command = std::function< void ()> |
Public Member Functions | |
| template<typename L > | |
| void | push (L &&lambda) |
| DeferredTasksBuffer (size_t reservedCapacity) | |
| using Command = std::function<void()> |
Type definition for a task command.
| DeferredTasksBuffer | ( | size_t | reservedCapacity | ) |
Creates a tasks queue with an initial capacity.
| reservedCapacity | The initial number of tasks to reserve space for. |
|
inline |
Pushes a task to the deferred buffer.
| L | The type of the task (usually a lambda). |
| lambda | The task to be executed. |