Scala, Concurrency, API, Project Loom, Java.
the other is interrupted, and the whole block throws that exception: try (var scope = new StructuredTaskScope.ShutdownOnFailure()) { Future<String> user = scope.fork(() -> findUser()); Future<Integer> order = scope.fork(() -> fetchOrder()); scope.join(); scope.throwIfFailed(); return new