gtopt::CoordinatorPool class

Fixed-width scene/pass orchestration pool (Tier 1).

Stateless beyond its nominal driver count: each run_driver call fans a callable onto its own thread and returns a future for the caller to await. Carries zero resource management by design (see file header).

Constructors, destructors, conversion operators

CoordinatorPool(std::size_t num_drivers) explicit noexcept

Public functions

auto num_drivers() const -> std::size_t noexcept
template<class Fn>
auto run_driver(Fn&& fn) -> std::future<std::invoke_result_t<Fn>>

Function documentation

std::size_t gtopt::CoordinatorPool::num_drivers() const noexcept

Nominal driver count (one per scene). Informational — the pool spawns exactly one thread per run_driver call.

template<class Fn>
std::future<std::invoke_result_t<Fn>> gtopt::CoordinatorPool::run_driver(Fn&& fn)

Run nullary fn on its own driver thread; returns a future for the result. Called once per scene per pass; the caller awaits the futures (which joins the driver threads).