Simulation Dispatcher
Holds the bounded CoroutineDispatcher used for concurrent simulation execution.
Simulations are CPU-intensive. Running more concurrent simulations than available processors degrades throughput rather than improving it. default is therefore capped at Runtime.availableProcessors.
To override the parallelism limit — for example when running on a machine with many cores but fewer are available to the JVM process, or in a test environment — replace default before launching any concurrent simulations:
SimulationDispatcher.default = Dispatchers.IO.limitedParallelism(4)The replacement must itself be bounded; the caller is responsible for ensuring the limit is appropriate for the target hardware.
Properties
The number of processors used to bound default. Exposed for inspection and test verification.
Bounded dispatcher for concurrent simulation execution. Defaults to Dispatchers.IO limited to availableProcessors. May be replaced before concurrent simulations are launched.