#include <JobCompletion.h>
Inherits AZ::Job.
Public Member Functions | |
AZ_CLASS_ALLOCATOR (JobCompletion, ThreadPoolAllocator) | |
JobCompletion (JobContext *context=nullptr) | |
void | StartAndWaitForCompletion () |
virtual void | Reset (bool isClearDependent) |
Public Member Functions inherited from AZ::Job | |
Job (bool isAutoDelete, JobContext *context, bool isCompletion=false, AZ::s8 priority=0) | |
void | Start () |
virtual void | Reset (bool isClearDependent) |
void | SetDependent (Job *dependent) |
void | SetDependentStarted (Job *dependent) |
void | SetContinuation (Job *continuationJob) |
void | StartAsChild (Job *childJob) |
void | WaitForChildren () |
bool | IsCancelled () const |
bool | IsAutoDelete () const |
bool | IsCompletion () const |
void | StartAndAssistUntilComplete () |
void | StartAndWaitForCompletion () |
JobContext * | GetContext () const |
Job * | GetDependent () const |
unsigned int | GetDependentCount () const |
void | IncrementDependentCount () |
void | DecrementDependentCount () |
AZ::s8 | GetPriority () const |
Protected Member Functions | |
virtual void | Process () |
Override to implement your processing. | |
Protected Member Functions inherited from AZ::Job | |
virtual void | Process ()=0 |
Override to implement your processing. | |
void | StoreDependent (Job *job) |
void | SetDependentChild (Job *dependent) |
void | IncrementDependentCountAndSetChildFlag () |
void | SetDependentCountAndFlags (unsigned int countAndFlags) |
unsigned int | GetDependentCountAndFlags () const |
Protected Attributes | |
AZStd::semaphore | m_semaphore |
Protected Attributes inherited from AZ::Job | |
JobContext *volatile | m_context |
AZStd::atomic< unsigned int > | m_dependentCountAndFlags |
AZStd::atomic< Job * > | m_dependent |
int | m_state |
Additional Inherited Members | |
Public Types inherited from AZ::Job | |
enum | State { STATE_SETUP , STATE_STARTED , STATE_PENDING , STATE_PROCESSING , STATE_SUSPENDED } |
Job which allows caller to block until it is completed. Useful as the last job in a series.
|
inlineprotectedvirtual |
Override to implement your processing.
Implements AZ::Job.
|
inlinevirtual |
Resets a non-auto-deleting job so it can be used again. If the dependent is not cleared, then it should be already in the reset state, in order to increment the dependent count.
Reimplemented from AZ::Job.
|
inline |
Call this function to start the job and block until the job has been completed.