completeAllWith

infix fun <T> List<CompletableDeferred<T>>.completeAllWith(result: Result<List<T>>): Boolean

Completes all the CompletableDeferred objects in the list with the values from the result if it is successful or completes them exceptionally with the error from the result if it is a failure.

Return

A Boolean indicating if all the CompletableDeferred objects were completed successfully.

Parameters

result

A Result containing a list of values to complete the CompletableDeferred objects with.

Throws

if the sizes of the lists don't match.