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

vineethraj49

03/30/2020, 6:30 AM
is there a way to create a
<http://Dispatchers.IO|Dispatchers.IO>
"clone" which has an even lesser number of threads? I see that
<http://Dispatchers.IO|Dispatchers.IO>
is defined as
LimitingDispatcher(this, parallelism, TaskMode.PROBABLY_BLOCKING)
, should it be possible to re-use the same implementation?
t

tseisel

03/30/2020, 7:02 AM
You can configure the maximum number of threads in the pool of
<http://Dispatchers.IO|Dispatchers.IO>
with the "`kotlinx.coroutines.io.parallelism`" JVM property: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html
4 Views