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

coder82

08/14/2019, 8:10 AM
For calling legacy services which will block on database calls, what's the best dispatcher? is it Dispatchers.IO?
👌 4
👍 1
g

gildor

08/14/2019, 9:14 AM
I would add, that easy answer is “Yes”, but it depends on your legacy service implementation, in some cases make sense to have own dispatcher for it and abstract all calls to have different amout of threads blocked by your database, or maybe forward all of them to single thread, or do some other stuff. Again, IO is easy solution that will work for most cases, but because you said “legacy service” better to understand how it used now and choose strategy that suits better for particular case
4 Views