Quick question, I couldn't really find a solution ...
# koin
n
Quick question, I couldn't really find a solution to this if I have a coroutine context that I want to be injected into my ViewModel, how would I go about separating the IO, Main, Default and so on?
Copy code
class DrillsSelectionViewModel(
    private val repository: DrillRepository,
    private val io: CoroutineContext
) : ViewModel() {


val dispatchersModule = module {

  //  single<CoroutineContext>{Dispatchers.Main}

    single<CoroutineContext>{<http://Dispatchers.IO|Dispatchers.IO>}
}
Now if I call
get()
on the viewmodel, how can I specify whether I want the IO or the Main?
a
you can do that by using qualifier on your definitions, and then you say that you want “IO” or “Main” dispatcher
n
Can you please throw a pseudo code of what you mean exactly?
don’t know if it helps
n
Helps a lot, are these some new docs or?
a
is it new documentation you mean?