A job is a threaded, reusable, independent work item (task). It can be queued to be executed with other jobs in a (parallel) pipeline.
A custom job is based on maxon::JobInterfaceTemplate, maxon::JobResultInterface and maxon::JobInterface. The custom class contains data and implements the function call operator with the actual workload. A job instance is based on maxon::JobRef.
A job can also implement:
A job has to be enqueued in a queue to be executed (see job queue below):
A running job can be cancelled:
These observers can be used to react to certain events:
Further utility function are:
Static utility functions are:
Jobs can be organized in job groups. These groups are used to execute and wait for multiple jobs simultaneously. The jobs of a group typically belong together. The jobs are executed as efficiently as possible.
The maxon::JobGroupRef members are:
Jobs that do belong to a job group can handle sub-jobs:
Jobs are added to a queue which executes these jobs. A queue provides worker threads and distributes the jobs.
Default job queues are:
It is possible to manually create queues in order to organize job execution.