Albert
08/31/2018, 8:03 AMval dispatcher = Executors.newFixedThreadPool(64).asCoroutineDispatcher()
runBlocking(dispatcher) {
launch {
// do something
}
}
I thought launch in the example would automatically inherit the dispatcher, but I see launch uses the CommonPool if it is implemented like this. Is there a way that this automatically inherits the parents dispatcher or should it always be used like this launch(coroutineContext)?elizarov
08/31/2018, 9:33 AM