I checked awaitAll implementation and it seems fairly complicated. Further, it will convert the list to an array, and then create another array of size n, which seems inefficient.
Can anyone shed some light on why awaitAll has such a complex implementation (at first glance)?
This function 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.