Package modelarium.multithreading


package modelarium.multithreading
Internal multithreading and parallel execution support.

This package contains the infrastructure used by Modelarium to execute simulations in parallel. It manages thread coordination, task distribution, and synchronization on behalf of the simulation engine.

Users are not expected to interact directly with the components in this package or to manage threads themselves. Parallel execution is configured and applied automatically by the engine.

When designing models, it is generally preferable for agents to interact primarily with other agents that are updated within the same execution context. Interaction patterns that require frequent coordination or shared mutable state across parallel execution contexts may limit scalability and reduce performance.

Structuring models to favour local interactions, coarse-grained updates, and predictable access patterns can help the engine exploit parallelism more effectively and reduce contention.

Implementations in this package may evolve as parallel execution strategies and performance characteristics are refined.