|
GlitchyByte Lib
0.3.1
GlitchyByte general library to bootstrap development.
|
Public Member Functions | |
| TaskRunner () noexcept | |
| ~TaskRunner () noexcept | |
| bool | isActive () const noexcept |
| void | shutdown () noexcept |
| bool | start (std::shared_ptr< Task > const &task) noexcept |
| void | cancelAll () noexcept |
| void | awaitAll () noexcept |
Task runner facility to run tasks in their own threads.
Note that start method will block until the task signals it has started. This is by design to ensure a task is ready to accept input, for example.
|
inlinenoexcept |
Creates a task runner.
|
inlinenoexcept |
Destroys the task runner.
It shuts down the runner as per shutdown().
|
inlinenoexcept |
Returns true if the runner is active and able to accept tasks.
|
inlinenoexcept |
Shuts down the runner.
Cancels all tasks and awaits on all tasks to stop.
|
inlinenoexcept |
Starts a task.
This method will block until the task signals it has started.
| task | Task to start. |
|
inlinenoexcept |
Cancels all tasks.
|
inlinenoexcept |
Awaits for all tasks to finish.