`repeat(1000) { loadAndCombine() }` will take 1000...
# coroutines
n
repeat(1000) { loadAndCombine() }
will take 1000 seconds
repeat(1000) { launch { loadAndCombine() }}
will take 1 second my question is whether wrapping it with
launch
is the “correct” way of doing this
g
Correct if you don't need result or operation
n
great! thanks @gildor, I guess i can use async, await/awaitall if i need results
g
and if you want to run them in concurrently, yes. Otherwise use withContext or suspend functions without wrappers