20 explicit MPDispatcher(std::vector<std::reference_wrapper<IDispatcher>> dispatchers);
Interface for process lifecycle dispatch orchestration.
void tick() override
Ticks all child dispatchers.
MPDispatcher(const MPDispatcher &)=delete
Result< void > createProcess(std::unique_ptr< ProcessImage > process, Tick currentTick) override
Routes a process to one child dispatcher.
MPDispatcher(std::vector< std::reference_wrapper< IDispatcher > > dispatchers)
Constructs MP dispatcher with worker dispatchers.
MPDispatcher(MPDispatcher &&) noexcept
MPDispatcher & operator=(const MPDispatcher &)=delete
Result< void > dispatch(std::size_t tickBudget) override
Runs dispatch cycle across all child dispatchers.
std::unique_ptr< Impl > impl_
Result< void > terminateProcess(ProcessId pid, Tick currentTick) override
Terminates process in the child dispatcher that owns it.
std::size_t processCount() const noexcept override
Aggregated number of processes across children.
bool hasProcess(ProcessId pid) const noexcept override
Returns true if any child contains process pid.
Full in-memory representation of a process.
A result type that holds either a success value of type T or an ErrorCode.
IDispatcher interface for process lifecycle orchestration.
std::uint64_t Tick
Simulation clock tick counter.
std::uint32_t ProcessId
Unique identifier for a process.