Dispatchers share threads, you run both of those coroutines inside a coroutine that uses Default dispatcher
Each of dispatchers has own thread policy, but try to reuse existing thread to avoid context switch
More details: https://github.com/Kotlin/kotlinx.coroutines/issues/261
m
mersan
11/16/2018, 2:27 PM
I thought am not running on the same Dispatcher since I explicitly passing IO for the first one and Default for the 2nd one
wow, looks neat solution
g
gildor
11/16/2018, 4:49 PM
You are not running on the same dispatcher, but dispatcher reuses a thread, created by another dispatcher