A small task containing a function to execute that can be queued in the thread pool. More...
#include <ThreadPool.h>
Public Attributes | |
| Function< void()> | function |
| Function that will be executed during the task. | |
| Function< void()> | afterRelease |
| Optional worker notification after an executed task node is released. | |
Friends | |
| struct | ThreadPool |
A small task containing a function to execute that can be queued in the thread pool.
Fill Task::function with any function to execute in the thread pool.
| Function<void()> SC::ThreadPoolTask::afterRelease |
Optional worker notification after an executed task node is released.
Discarded queued tasks do not notify. A copy is invoked, so it may destroy or requeue this Task. waitForTask waits for node release; waitForAllTasks/destroy also join this notification. Keep it nonblocking with respect to the pool itself: do not wait for or destroy this pool from here.
| Function<void()> SC::ThreadPoolTask::function |
Function that will be executed during the task.