When using a DB connection pool like HikariCP. Sho...
# coroutines
l
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
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
You could also use the worker pool pattern to limit concurrency, you don’t need a dedicated dispatcher.
219 Views