TaskDesc#
Fully qualified name: carb::tasking::TaskDesc
Defined in carb/tasking/TaskingTypes.h
-
struct TaskDesc#
Defines a task descriptor.
Public Functions
Public Members
-
void *taskArg#
The argument passed to the task function.
-
Object requiredObject#
If not nullptr, then the task will only start when this counter reaches its target value. Specifying the counter here is more efficient than having the task function yieldUntilCounter().
-
Semaphore *waitSemaphore#
If waitSemaphore is not nullptr, then the task will wait on the semaphore before starting. This can be used to throttle tasks. If requiredObject is also specified, then the semaphore is not waited on until requiredObject has reached its target value. Specifying the semaphore here is more efficient than having the task function wait on the semaphore.
-
OnTaskFn cancel#
Optional. An OnTaskFn that is executed only when ITasking::tryCancelTask() successfully cancels the task. Called in the context of ITasking::tryCancelTask(). Typically provided to destroy taskArg.
-
void *taskArg#