Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::JobContext Class Reference

#include <JobContext.h>

Public Member Functions

 AZ_CLASS_ALLOCATOR (JobContext, ThreadPoolAllocator)
 
 JobContext (JobManager &jobManager)
 
 JobContext (JobManager &jobManager, JobCancelGroup &cancelGroup)
 
 JobContext (const JobContext &rhs)
 
JobContextoperator= (const JobContext &)=delete
 
JobManagerGetJobManager () const
 
void SetCancelGroup (JobCancelGroup *cancelGroup)
 
JobCancelGroupGetCancelGroup () const
 

Static Public Member Functions

static void SetGlobalContext (JobContext *context)
 
static JobContextGetGlobalContext ()
 
static JobContextGetParentContext ()
 

Detailed Description

A job context stores information about the execution environment of jobs, a single context should be shared between many jobs.

Member Function Documentation

◆ GetParentContext()

static JobContext * AZ::JobContext::GetParentContext ( )
static

Gets the context of the currently processing job, or the global context if this is a top-level job. Note that this requires a global context to have been set, and only returns the current job from that context, if there are other JobManagers they are not used.

◆ SetCancelGroup()

void AZ::JobContext::SetCancelGroup ( JobCancelGroup cancelGroup)
inline

Call this only before jobs using this context have been created, it is not threadsafe.

◆ SetGlobalContext()

static void AZ::JobContext::SetGlobalContext ( JobContext context)
static

Sets the global job context, this is what will be used when creating a top-level job without specifying the context explicitly.


The documentation for this class was generated from the following file: