Implementation of a JobSystem without threads, runs jobs as soon as they are added.
More...
#include <JobSystemSingleThreaded.h>
|
virtual void | QueueJob (Job *inJob) override |
| Adds a job to the job queue.
|
|
virtual void | QueueJobs (Job **inJobs, uint inNumJobs) override |
| Adds a number of jobs at once to the job queue.
|
|
virtual void | FreeJob (Job *inJob) override |
| Frees a job.
|
|
|
using | JobFunction = function< void()> |
| Main function of the job.
|
|
Implementation of a JobSystem without threads, runs jobs as soon as they are added.
◆ AvailableJobs
Array of jobs (fixed size)
◆ JobSystemSingleThreaded() [1/2]
◆ JobSystemSingleThreaded() [2/2]
JobSystemSingleThreaded::JobSystemSingleThreaded |
( |
uint |
inMaxJobs | ) |
|
|
inlineexplicit |
◆ CreateBarrier()
Create a new barrier, used to wait on jobs.
Implements JobSystem.
◆ CreateJob()
Create a new job, the job is started immediately if inNumDependencies == 0 otherwise it starts when RemoveDependency causes the dependency counter to reach 0.
Implements JobSystem.
◆ DestroyBarrier()
void JobSystemSingleThreaded::DestroyBarrier |
( |
Barrier * |
inBarrier | ) |
|
|
overridevirtual |
Destroy a barrier when it is no longer used. The barrier should be empty at this point.
Implements JobSystem.
◆ FreeJob()
void JobSystemSingleThreaded::FreeJob |
( |
Job * |
inJob | ) |
|
|
overrideprotectedvirtual |
◆ GetMaxConcurrency()
virtual int JobSystemSingleThreaded::GetMaxConcurrency |
( |
| ) |
const |
|
inlineoverridevirtual |
Get maximum number of concurrently executing jobs.
Implements JobSystem.
◆ Init()
Initialize the job system
- Parameters
-
inMaxJobs | Max number of jobs that can be allocated at any time |
◆ QueueJob()
void JobSystemSingleThreaded::QueueJob |
( |
Job * |
inJob | ) |
|
|
overrideprotectedvirtual |
Adds a job to the job queue.
Implements JobSystem.
◆ QueueJobs()
void JobSystemSingleThreaded::QueueJobs |
( |
Job ** |
inJobs, |
|
|
uint |
inNumJobs |
|
) |
| |
|
overrideprotectedvirtual |
Adds a number of jobs at once to the job queue.
Implements JobSystem.
◆ WaitForJobs()
void JobSystemSingleThreaded::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.
◆ mDummyBarrier
Shared barrier since the barrier implementation does nothing.
◆ mJobs
The documentation for this class was generated from the following files: