I was hoping code like follows would wait for both futures, but it does not.
object Fiddle {
val f1 = Future {
throw new Throwable(\"baaa\") // emulat
A Future
produced by Future.sequence
completes when either:
The second point is what's happening in your case, and it makes sense to complete as soon as one of the wrapped Future
has failed, because the wrapping Future
can only hold a single Throwable
in the failure case. There's no point in waiting for the other futures because the result will be the same failure.