|
|
JobContainer & | data (JobHandle jobHandle) |
| |
|
const JobContainer & | data (JobHandle jobHandle) const |
| |
| GAIA_NODISCARD JobHandle | alloc_job (const Job &job) |
| | Allocates a new job container identified by a unique JobHandle.
|
| |
| void | free_job (JobHandle jobHandle) |
| | Invalidates jobHandle by resetting its index in the job pool. Every time a job is deallocated its generation is increased by one.
|
| |
|
void | reset () |
| | Resets the job pool.
|
| |
| void | dep (JobHandle jobFirst, JobHandle jobSecond) |
| | Makes jobSecond depend on jobFirst. This means jobSecond will not run until jobFirst finishes.
|
| |
| void | dep (std::span< JobHandle > jobsFirst, JobHandle jobSecond) |
| | Makes jobSecond depend on the jobs listed in jobsFirst. This means jobSecond will not run until all jobs from jobsFirst finish.
|
| |
| void | dep_refresh (std::span< JobHandle > jobsFirst, JobHandle jobSecond) |
| | Makes jobSecond depend on the jobs listed in jobsFirst. This means jobSecond will not run until all jobs from jobsFirst finish.
|
| |
|
GAIA_NODISCARD bool | is_clear (JobHandle jobHandle) const |
| |
◆ alloc_job()
| GAIA_NODISCARD JobHandle gaia::mt::JobManager::alloc_job |
( |
const Job & |
job | ) |
|
|
inline |
Allocates a new job container identified by a unique JobHandle.
- Returns
- JobHandle
- Warning
- Must be used from the main thread.
◆ dep() [1/2]
Makes jobSecond depend on jobFirst. This means jobSecond will not run until jobFirst finishes.
- Parameters
-
| jobFirst | The job that must complete first. |
| jobSecond | The job that will run after jobFirst. |
- Warning
- This must be called before any of the listed jobs are scheduled.
◆ dep() [2/2]
Makes jobSecond depend on the jobs listed in jobsFirst. This means jobSecond will not run until all jobs from jobsFirst finish.
- Parameters
-
| jobsFirst | Jobs that must complete first. |
| jobSecond | The job that will run after jobsFirst. |
- Warning
- This must must to be called before any of the listed jobs are scheduled.
◆ dep_refresh()
Makes jobSecond depend on the jobs listed in jobsFirst. This means jobSecond will not run until all jobs from jobsFirst finish.
- Parameters
-
| jobsFirst | Jobs that must complete first. |
| jobSecond | The job that will run after jobsFirst. |
- Note
- Unlike dep() this function needs to be called when job handles are reused.
- Warning
- This must be called before any of the listed jobs are scheduled.
◆ free_job()
| void gaia::mt::JobManager::free_job |
( |
JobHandle |
jobHandle | ) |
|
|
inline |
Invalidates jobHandle by resetting its index in the job pool. Every time a job is deallocated its generation is increased by one.
- Parameters
-
- Warning
- Must be used from the main thread.
◆ run()
| static void gaia::mt::JobManager::run |
( |
JobContainer & |
jobData | ) |
|
|
inlinestatic |
Execute the functor associated with the job container.
- Parameters
-
| jobData | Container with internal job specific data |
The documentation for this class was generated from the following file:
- /home/runner/work/gaia-ecs/gaia-ecs/include/gaia/mt/jobmanager.h