Isn’t “awaiting each one independently” different from using awaitAll
? Based on the documentation for awaitAll
:
awaitAll is not equivalent to deferreds.map { it.await() } which fails only when it sequentially gets to wait for the failing deferred, while this awaitAll fails immediately as soon as any of the deferreds fail.
I used GlobalSclope
for illustrative purposes only, those methods are copied over as-is from here