Manages a pool of tasks, allocated from a circular array. Tasks are reused instead of being deallocated explicitly.
More...
#include <task.hpp>
|
| static task_t * | allocate (auto &&func, task_t *parent=nullptr) |
| | Allocates a task with the specified function and parent, placing it in a circular buffer.
|
| |
|
| static constexpr std::size_t | max_tasks = 4096 |
| | Maximum number of tasks that can exist at any given time per worker.
|
| |
Manages a pool of tasks, allocated from a circular array. Tasks are reused instead of being deallocated explicitly.
◆ allocate()
| static task_t * co_ecs::task_pool::allocate |
( |
auto && | func, |
|
|
task_t * | parent = nullptr ) |
|
inlinestatic |
Allocates a task with the specified function and parent, placing it in a circular buffer.
- Parameters
-
| func | A callable object to be executed by the task. |
| parent | Optional pointer to a parent task. |
- Returns
- Pointer to the newly allocated task.
◆ max_tasks
| constexpr std::size_t co_ecs::task_pool::max_tasks = 4096 |
|
staticconstexpr |
Maximum number of tasks that can exist at any given time per worker.
The documentation for this class was generated from the following file: