koufa
08/12/2024, 1:37 PM<http://Dispatchers.IO|Dispatchers.IO>
? As only 1 thread can run at a time. Would it be sufficient to just use coroutineScope
and async
directly ?kevin.cianfarini
08/12/2024, 1:40 PM<http://Dispatchers.IO|Dispatchers.IO>
. Threads which are blocked by IO will be parked by the OS until they can be resumed, which is why <http://Dispatchers.IO|Dispatchers.IO>
can create and use more threads than the CPU supports.koufa
08/12/2024, 1:41 PMkevin.cianfarini
08/12/2024, 1:43 PMHttpClient
then you'll want to use <http://Dispatchers.IO|Dispatchers.IO>
. If you're using something that handles this for you, like Retrofit's suspending function, then you don't need to worry about dispatchers.koufa
08/12/2024, 1:50 PMkevin.cianfarini
08/12/2024, 1:52 PM