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

elizarov

09/19/2017, 7:18 PM
@dragas There is no reason to use coroutines unless you have any suspending (async) function. If it all just CPU-bound, the coroutines offer a little help/improvement. For CPU-bound task, like parallel collection processing, Java8 streams work best. Coroutines are designed for tasks that wait for something most of the time.
d

dragas

09/19/2017, 7:20 PM
Somewhere down the pipeline you will still have to run blocking task while other coroutines depend on it, won't you? 😕
d

diesieben07

09/19/2017, 8:13 PM
If there is an actual blocking thing, yes, you will have to do a blocking call. But if you have asynchronous IO or you're using
delay
you do not have blocking.
2 Views