C4 Engine
C4 Engine API Documentation

ThreadMgr::CancelJob

Defined in:  C4Threads.h
Cancels a single job.
Prototype

void CancelJob(Job *job);

Parameters
job The job to cancel.
Description
The CancelJob function cancels the job specified by the job parameter. If the job is in the executing state when this function is called, then a flag is set in the Job object. The job's execution function must call the Job::JobCancelled function to be aware of the cancellation, and it should exit early when it has been cancelled. (Jobs are not forced to exit by the Thread Manager.)

If the job has not yet begun executing when this function is called, then it is simply removed from the execution queue.
See Also

ThreadMgr::CancelJobArray

ThreadMgr::SubmitJob

ThreadMgr::FinishBatch