Jeong Rok Suh
12/07/2022, 6:07 AMSam
12/07/2022, 7:16 AMasync
to start each worker coroutine and put the deferred results into a list, then use awaitAll
. Or if you need more flexibility, e.g. to access some results while others are still being computed, you could have the worker coroutines send their results to a shared channel, and then launch one additional coroutine to collect the results.kevin.cianfarini
12/07/2022, 1:46 PMSynchronizedList
is really acting as a queue of work, you should instead look into Channel
.