#include <JobSystemWithBarrier.h>
|
| using | JobFunction = function<void()> |
| | Main function of the job.
|
| |
| virtual void | QueueJob (Job *inJob)=0 |
| | Adds a job to the job queue.
|
| |
| virtual void | QueueJobs (Job **inJobs, uint inNumJobs)=0 |
| | Adds a number of jobs at once to the job queue.
|
| |
| virtual void | FreeJob (Job *inJob)=0 |
| | Frees a job.
|
| |
Implementation of the Barrier class for a JobSystem
This class can be used to make it easier to create a new JobSystem implementation that integrates with your own job system. It will implement all functionality relating to barriers, so the only functions that are left to be implemented are:
See instructions in JobSystem for more information on how to implement these.
◆ JobSystemWithBarrier() [1/2]
| JobSystemWithBarrier::JobSystemWithBarrier |
( |
uint | inMaxBarriers | ) |
|
|
explicit |
◆ JobSystemWithBarrier() [2/2]
| JobSystemWithBarrier::JobSystemWithBarrier |
( |
| ) |
|
|
default |
◆ ~JobSystemWithBarrier()
| JobSystemWithBarrier::~JobSystemWithBarrier |
( |
| ) |
|
|
overridevirtual |
◆ CreateBarrier()
Create a new barrier, used to wait on jobs.
Implements JobSystem.
◆ DestroyBarrier()
| void JobSystemWithBarrier::DestroyBarrier |
( |
Barrier * | inBarrier | ) |
|
|
overridevirtual |
Destroy a barrier when it is no longer used. The barrier should be empty at this point.
Implements JobSystem.
◆ Init()
| void JobSystemWithBarrier::Init |
( |
uint | inMaxBarriers | ) |
|
Initialize the barriers
- Parameters
-
| inMaxBarriers | Max number of barriers that can be allocated at any time |
◆ WaitForJobs()
| void JobSystemWithBarrier::WaitForJobs |
( |
Barrier * | inBarrier | ) |
|
|
overridevirtual |
Wait for a set of jobs to be finished, note that only 1 thread can be waiting on a barrier at a time.
Implements JobSystem.
The documentation for this class was generated from the following files: