|
engine-mk1
|
Creates and manages worker threads that work on dependency based Task lists. More...
#include <TaskScheduler.hpp>
Public Member Functions | |
| TaskScheduler () noexcept | |
| Default constructor. More... | |
| TaskScheduler (const TaskScheduler &)=delete | |
| TaskScheduler (TaskScheduler &&)=delete | |
| ~TaskScheduler () | |
| Default destructor. More... | |
| TaskScheduler & | operator= (const TaskScheduler &)=delete |
| TaskScheduler & | operator= (TaskScheduler &&)=delete |
| Task | push (WorkFunc work, Task dependency=Task{}) |
| Pushes a new Task to be scheduled. More... | |
| Task | push (WorkGroup group, Task dependency=Task{}) |
| Pushes a group Task to be scheduled. More... | |
| Task | pushGraph (WorkGraph workGraph, Task dependency=Task{}) |
| Creates and pushes a series of interdependent Tasks from a WorkGraph. More... | |
| void | helpWorkers () |
| A function to let the main thread help process Tasks until there are none left. More... | |
Creates and manages worker threads that work on dependency based Task lists.
For more information and examples, see page TaskScheduler.
|
noexcept |
Default constructor.
| TaskScheduler::~TaskScheduler | ( | ) |
Default destructor.
| void TaskScheduler::helpWorkers | ( | ) |
A function to let the main thread help process Tasks until there are none left.
Pushes a group Task to be scheduled.
The first WorkFunc in the WorkGroup becomes the parent Task, with the remaining WorkFuncs becoming child Tasks of the parent Task.
| group | The WorkGroup to be create Tasks from. |
| dependency | <optional> The Task that must finish before this one can run. |
1.8.11