Title
l

lukaswelte

10/24/2018, 1:47 PM
When using a DB connection pool like HikariCP. Should one opt for
<http://Dispatchers.IO|Dispatchers.IO>
or a
newFixedThreadPoolContext
with the number of threads being the max DB pool size?
e

enleur

10/24/2018, 2:11 PM
I would go with
<http://Dispatchers.IO|Dispatchers.IO>
and switch to own
DB
dispatcher when https://github.com/Kotlin/kotlinx.coroutines/issues/261 resolved
👍 1
z

Zach Klippenstein (he/him) [MOD]

10/24/2018, 4:15 PM
You could also use the worker pool pattern to limit concurrency, you don’t need a dedicated dispatcher.