Anyone happen to know if Retrofit 2.6.0 uses <Disp...
# android
b
Anyone happen to know if Retrofit 2.6.0 uses Dispatchers.IO by default with coroutines?
g
No, it uses built in OkHttp dispatcher (not coroutine, OkHttp abstraction on top of threadpool), same way as it happens with defaul async Retrofit API (retrofit2.Call class)
b
But it’s not main thread which is what’s important
g
No, same way as request started using enque method of Call
This is actually default behavior for any coroutine adapter for callbacks, it has nothing to do with dispatchers, just wrap some callback to coroutine using Continuation by calling continuation.resume() from callback
It also the same behavior that would you have with RxJava asyncronous adapter for Retrofit