ludus::foundation::threading::JobGraph¶
Ludus Wiki · API overview · Browse API
Class
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
#include <ludus/foundation/threading/jobs.hpp>
class ludus::foundation::threading::JobGraph final
Methods¶
JobGraph¶
ludus::foundation::threading::JobGraph::JobGraph() noexcept=default
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
~JobGraph¶
ludus::foundation::threading::JobGraph::~JobGraph() noexcept
Warning
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
JobGraph¶
ludus::foundation::threading::JobGraph::JobGraph(const JobGraph &)=delete
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
operator=¶
JobGraph & ludus::foundation::threading::JobGraph::operator=(const JobGraph &)=delete
Related types: JobGraph
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
JobGraph¶
ludus::foundation::threading::JobGraph::JobGraph(JobGraph &&)=delete
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
operator=¶
JobGraph & ludus::foundation::threading::JobGraph::operator=(JobGraph &&)=delete
Related types: JobGraph
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Initialize¶
JobStatus ludus::foundation::threading::JobGraph::Initialize(JobGraphConfig config={}) noexcept
| Parameter | Description |
|---|---|
config |
Fixed capacities; MaxJobs must be nonzero.
|
Returns
Related types: JobStatus · JobGraphConfig
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Add¶
JobStatus ludus::foundation::threading::JobGraph::Add(JobFunction function, void *contextOrNull, JobHandle &outHandle, JobLabel label={}) noexcept
| Parameter | Description |
|---|---|
function |
Callback; must not be null.
|
contextOrNull |
Value passed to every invocation of the callback. Not owned.
|
outHandle |
Receives the new job's handle, or a default (invalid) handle on failure.
|
label |
Optional identity reported to trace hooks; stored by value without allocation. The name is borrowed (see JobLabel::NameOrNull).
|
Returns
Related types: JobFunction · JobStatus · JobHandle · JobLabel
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
DependsOn¶
JobStatus ludus::foundation::threading::JobGraph::DependsOn(JobHandle dependent, JobHandle prerequisite) noexcept
dependent runs only after prerequisite succeeds. Returns
Related types: JobStatus · JobHandle
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Seal¶
JobStatus ludus::foundation::threading::JobGraph::Seal() noexcept
Returns
Related types: JobStatus
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Reset¶
JobStatus ludus::foundation::threading::JobGraph::Reset() noexcept
Returns
Related types: JobStatus
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
GetOutcome¶
JobStatus ludus::foundation::threading::JobGraph::GetOutcome(JobHandle handle, JobOutcome &outOutcome) const noexcept
| Parameter | Description |
|---|---|
handle |
Job handle returned by Add in the current generation.
|
outOutcome |
Receives the outcome; Pending on failure.
|
Returns
Related types: JobStatus · JobOutcome · JobHandle
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp