Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
JobSystem::Barrier Class Referenceabstract

A job barrier keeps track of a number of jobs and allows waiting until they are all completed. More...

#include <JobSystem.h>

Inheritance diagram for JobSystem::Barrier:
NonCopyable JobSystemSingleThreaded::BarrierImpl

Public Member Functions

virtual JPH_OVERRIDE_NEW_DELETE void AddJob (const JobHandle &inJob)=0
 
virtual void AddJobs (const JobHandle *inHandles, uint inNumHandles)=0
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Protected Member Functions

virtual ~Barrier ()=default
 Destructor, you should call JobSystem::DestroyBarrier instead of destructing this object directly. More...
 
virtual void OnJobFinished (Job *inJob)=0
 Called by a Job to mark that it is finished. More...
 

Friends

class Job
 Job needs to be able to call OnJobFinished. More...
 

Detailed Description

A job barrier keeps track of a number of jobs and allows waiting until they are all completed.

Constructor & Destructor Documentation

◆ ~Barrier()

virtual JobSystem::Barrier::~Barrier ( )
protectedvirtualdefault

Destructor, you should call JobSystem::DestroyBarrier instead of destructing this object directly.

Member Function Documentation

◆ AddJob()

virtual JPH_OVERRIDE_NEW_DELETE void JobSystem::Barrier::AddJob ( const JobHandle inJob)
pure virtual

Add a job to this barrier Note that jobs can keep being added to the barrier while waiting for the barrier

Implemented in JobSystemSingleThreaded::BarrierImpl.

◆ AddJobs()

virtual void JobSystem::Barrier::AddJobs ( const JobHandle inHandles,
uint  inNumHandles 
)
pure virtual

Add multiple jobs to this barrier Note that jobs can keep being added to the barrier while waiting for the barrier

Implemented in JobSystemSingleThreaded::BarrierImpl.

◆ OnJobFinished()

virtual void JobSystem::Barrier::OnJobFinished ( Job inJob)
protectedpure virtual

Called by a Job to mark that it is finished.

Implemented in JobSystemSingleThreaded::BarrierImpl.

Friends And Related Function Documentation

◆ Job

friend class Job
friend

Job needs to be able to call OnJobFinished.


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