Class SimulationDispatcher

Nested Relationships

Nested Types

Class Documentation

class SimulationDispatcher

Declaration: final

Transfers owned requests to the runtime’s simulation thread.

Only the simulation owner may access its mutable game state. Queue owned requests; borrowed captures must outlive completion or owner-thread cancellation. Never wait on a simulation future from the simulation owner. Delivery precedes input transfer at each actual update boundary in either runtime mode. Shutdown destroys pending captures on the owner before resource cleanup; futures report broken_promise. Submission handles remain safe after dispatcher destruction.

Public Functions

SimulationDispatcher() = default
~SimulationDispatcher()
SimulationDispatcher(const SimulationDispatcher&) = delete
SimulationDispatcher &operator=(const SimulationDispatcher&) = delete
inline Submission submission() const

Declaration: [[nodiscard]]

template<typename Work>
inline std::future<std::invoke_result_t<std::decay_t<Work>&>> submit(Work &&work)

Declaration: [[nodiscard]]

bool has_pending() const

Declaration: [[nodiscard]]

CE::Diagnostics::DispatchStats diagnostics() const

Declaration: [[nodiscard]]