#include <job.h>
Template for jobs which inherit from JobInterface (and are not created using a lambda).
IMPLEMENTATION | The job implementation type (used to build the jump table). |
RESULTVALUETYPE | An optional result value type to be used if the job returns more than just Result<void>. |
USE_VIRTUAL_DESTRUCTOR | By default ~IMPLEMENTATION() is called on destruction. Specify true if you require a virtual destructor. |
The following snippet implements a job which returns an Int.
Static Public Member Functions | |
template<typename... ARGS> | |
static ResultMemT< JobResultRef< RESULTVALUETYPE > > | Create (ARGS &&... args) |
Static Public Member Functions inherited from JobInterface | |
template<JOBCANCELLATION B = JOBCANCELLATION::AUTOMATIC, typename FN , typename... ARGS> | |
static ResultMemT< JobInterface * > | Create (FN &&src, ARGS &&... args) |
static Int | GetCurrentWorkerThreadIndex () |
static Int | GetCurrentThreadCount () |
static Bool | IsCurrentJobCancelled (const JobInterface *optionalJob=nullptr) |
static JobStatusInterface * | GetCurrentJob () |
Private Member Functions | |
MAXON_DISALLOW_COPY_AND_ASSIGN (JobInterfaceTemplate) | |