Using retrofit and a converter as below, does dese...
# squarelibraries
b
Using retrofit and a converter as below, does deserialization happen on a background thread by default? I am trying to figure out if specifying Dispatchers.IO is an unnecessary context switch.
Copy code
interface Service { 
  @GET("/food")
  suspend fun getFood(): Food
}

val food = withContext(<http://Dispatchers.IO|Dispatchers.IO>) { service.getFood() }

OR 

val food = service.getFood()
j
Background thread, yes
👍 1