Engine → Core
job_handle.h
Declarations for job_handle.h.
Structs
| File |
Description |
jobs::detail::job_counter |
Number of jobs still outstanding for one handle. Shared between the handle, the job system and every queued job block that belongs to the handle. 64 bits wide so a parallel_for over a huge range can never truncate its range count. |
Classes
| File |
Description |
jobs::job_fence |
Caller-owned completion state of one or more batches: the allocation-free counterpart of a job_handle for code that dispatches the same batch every frame (the ECS scheduler's stages). job_system::schedule(jobs, fence) adds a batch, job_system::wait(fence) returns once every job added so far has run. Queued jobs hold the fence's address, so the owner keeps it alive and in place until it is complete; it can then be reused. Neither copyable nor movable for that reason. |
jobs::job_handle |
Reference to the completion state of one scheduled job or of a batch scheduled together. Handles are cheap to copy; every copy observes the same counter. A default-constructed handle is invalid and reports itself complete, so waiting on it is a no-op. |
Forward Declarations
jobs::job_system