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

qwert_ukg

12/28/2017, 5:31 AM
I have several methods with async call, should i create local pool inside each method, or will be better if i make it one per class instance ?
g

gildor

12/28/2017, 5:39 AM
Are you talking about coroutines Dispatchers?
It depends on your case, how many threads do you want to have and how to group them.
q

qwert_ukg

12/28/2017, 5:51 AM
Actually, deferent methods needs deferent threads count. It depends on count of blocking call in old code. E.g. i have an action of controller who call another 3 actions inside him, everything is synchronously. Now i want to call only one method of my new Kotlin service who will call it in async way.
I will show u
3 Views