Lena Stepanova
11/23/2021, 2:04 PMtal
11/24/2021, 3:21 PMby inject() ) and changing coroutine dispatchers.
I don’t fully understand what the issue is, but I observed that instantiating the KoinComponent on one thread and resolving the dependency in another thread causes trouble. The ways to avoid trouble that I’ve used are:
• Eagerly resolve dependencies in shared code by using get() instead of by inject() . Or:
• Making sure that dependency resolution happens on the same thread that the KoinComponent is instantiated on.