ludus::foundation::threading::JobSystem¶
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::JobSystem final
Methods¶
JobSystem¶
ludus::foundation::threading::JobSystem::JobSystem() noexcept=default
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
~JobSystem¶
ludus::foundation::threading::JobSystem::~JobSystem() noexcept
Warning
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
JobSystem¶
ludus::foundation::threading::JobSystem::JobSystem(const JobSystem &)=delete
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
operator=¶
JobSystem & ludus::foundation::threading::JobSystem::operator=(const JobSystem &)=delete
Related types: JobSystem
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
JobSystem¶
ludus::foundation::threading::JobSystem::JobSystem(JobSystem &&)=delete
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
operator=¶
JobSystem & ludus::foundation::threading::JobSystem::operator=(JobSystem &&)=delete
Related types: JobSystem
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Initialize¶
JobStatus ludus::foundation::threading::JobSystem::Initialize(JobSystemConfig config={}) noexcept
| Parameter | Description |
|---|---|
config |
Worker budget and hooks; see JobSystemConfig.
|
Returns
Related types: JobStatus · JobSystemConfig
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Submit¶
JobStatus ludus::foundation::threading::JobSystem::Submit(JobGraph &inoutGraph) noexcept
| Parameter | Description |
|---|---|
inoutGraph |
Graph whose per-job execution state is reset for this run.
|
Returns
Related types: JobGraph · JobStatus
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Wait¶
JobStatus ludus::foundation::threading::JobSystem::Wait(JobOutcome &outOutcome, bool shouldHelp=true) noexcept
shouldHelp, the caller also executes ready jobs; pass false when thread identity, thread-local state or responsiveness make that inappropriate. | Parameter | Description |
|---|---|
outOutcome |
Failed if any job failed, otherwise Cancelled if any job was cancelled, otherwise Succeeded. Blocked jobs follow from one of the former. Pending when the call fails.
|
shouldHelp |
Whether the calling thread executes ready jobs while it waits.
|
Returns
Related types: JobStatus · JobOutcome
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Cancel¶
JobStatus ludus::foundation::threading::JobSystem::Cancel() noexcept
Returns
Related types: JobStatus
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Snapshot¶
JobStatus ludus::foundation::threading::JobSystem::Snapshot(JobSnapshot &outSnapshot) const noexcept
| Parameter | Description |
|---|---|
outSnapshot |
Receives the counts; all zero when no graph is submitted or on failure.
|
Returns
Related types: JobStatus · JobSnapshot
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
GetWorkerCount¶
uint32 ludus::foundation::threading::JobSystem::GetWorkerCount() const noexcept
Returns
Related types: uint32
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp
Shutdown¶
JobStatus ludus::foundation::threading::JobSystem::Shutdown() noexcept
Returns
Related types: JobStatus
Declared in modules/foundation/threading/include/ludus/foundation/threading/jobs.hpp