#include <MultipleDependentJob.h>
Inherits AZ::Job.
Public Member Functions | |
| AZ_CLASS_ALLOCATOR (MultipleDependentJob, ThreadPoolAllocator) | |
| MultipleDependentJob (bool isAutoDelete, JobContext *context=NULL) | |
| void | AddDependent (Job *dependent) |
| virtual void | Reset (bool isClearDependent) |
| virtual void | Process () |
Public Member Functions inherited from AZ::Job | |
| Job (bool isAutoDelete, JobContext *context, bool isCompletion=false, AZ::s8 priority=0) | |
| void | Start () |
| 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 |
Additional Inherited Members | |
Public Types inherited from AZ::Job | |
| enum | State { STATE_SETUP , STATE_STARTED , STATE_PENDING , STATE_PROCESSING , STATE_SUSPENDED } |
Protected Member Functions inherited from AZ::Job | |
| void | StoreDependent (Job *job) |
| void | SetDependentChild (Job *dependent) |
| void | IncrementDependentCountAndSetChildFlag () |
| void | SetDependentCountAndFlags (unsigned int countAndFlags) |
| unsigned int | GetDependentCountAndFlags () const |
Protected Attributes inherited from AZ::Job | |
| JobContext *volatile | m_context |
| AZStd::atomic< unsigned int > | m_dependentCountAndFlags |
| AZStd::atomic< Job * > | m_dependent |
| int | m_state |
A job which maintains a list of dependent jobs, for the situations where having a single dependent or forking new jobs is not sufficient. Note that these situations should be rare, for example a many-to-many dependency tree. This class may be used stand-alone or derived from, if it is derived from make sure the derived Process function calls MultipleDependentJob::Process when it finishes.
Adds a new job which is dependent on this one, the dependent will not be allowed to run until this job is complete.
|
inlinevirtual |
Make sure to call this at the end of a derived Process function!
Implements AZ::Job.
Resets a non-auto deleting job. The dependent list will not be cleared, and will have their dependency counters incremented, so they must be reset first before resetting this job.
Reimplemented from AZ::Job.