ScopeRegistry.deleteScope Attention: _scopes.remove(scope.id) // ConcurrentModificationException
_scopes is a HashMap from Kotlin/Native and starts from 1.9.20 it has a checkForComodification that produce exception when collection changed in forEach loop.
Koin module and version:
Starts from Kotlin 1.9.20
Test environment with checkKoinModules produce
kotlin.ConcurrentModificationException
.Stacktrace:
_scopes.values.forEach
_koin.scopeRegistry.deleteScope(this)
_scopes.remove(scope.id)
// ConcurrentModificationException_scopes
is a HashMap from Kotlin/Native and starts from 1.9.20 it has a checkForComodification that produce exception when collection changed inforEach
loop.Koin module and version: Starts from Kotlin 1.9.20
Snippet or Sample project to help reproduce
Maybe in test environment we need use special mechanism for scopes that avoid problem with ConcurrentModificationException, but docs doesn't have info about it: https://insert-koin.io/docs/reference/koin-test/checkmodules