Hi, I got problem with accessing object from backg...
# koin
j
Hi, I got problem with accessing object from background (
Dispatchers.Default
) thread, which is injected by koin, it throws excpetion:
illegal attempt to access non-shared org.koin.core.context.GlobalContext.KoinInstanceHolder@348f4a8 from other thread
i.m using 3.0.1 version. Any idea how to resolve that issue?
Copy code
@ThreadLocal
object ObjFactory : KoinComponent {
    val appStateRepository: AppStateRepository by inject() // not ok if I access from background thread
    val appStateRepositoryNew = AppStateRepository() // ok from background thread
}