holgerbrandl / kalasim

Discrete Event Simulator
https://www.kalasim.org/
MIT License
69 stars 10 forks source link

Consider using koin context isolation #20

Closed holgerbrandl closed 2 years ago

holgerbrandl commented 2 years ago

Instead of the custom model we should use context isolation to provide DI per simulation

https://insert-koin.io/docs/reference/koin-core/context-isolation/

holgerbrandl commented 2 years ago

Alternatively, we could bind the koin scope to the thread.

Constraining the koin scope to the is unlikely to work because of the common Environment().apply pattern (unless we would overload apply itself.