https://kotlinlang.org logo
#coroutines
Title
# coroutines
m

mayojava

09/30/2018, 4:45 PM
are there any major difference between
<http://Dispatchers.IO|Dispatchers.IO>
and
Dispatchers.DEFAULT
that one needs to know about
d

Dominaezzz

09/30/2018, 5:27 PM
<http://Dispatchers.IO|Dispatchers.IO>
should be used for blocking operations and
Dispatchers.DEFAULT
should be used for non-blocking.
e

elizarov

09/30/2018, 7:43 PM
Yes.
Default
is for CPU-intensive tasks and is limited by the # of CPU cores, while
IO
is for blocking operations that are not supposed to consume CPU (by default it is configured to support 64 concurrent operations)
👍 2
m

mayojava

09/30/2018, 8:36 PM
👍
2 Views