From be6c15ecb490e86bafc15b5cd552784f7aa3ee69 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Wed, 20 Aug 2025 16:07:38 +0000 Subject: [PATCH] 8365671: Typo in Joiner.allUntil example Reviewed-by: liach --- .../classes/java/util/concurrent/StructuredTaskScope.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java index fb16e0a615e..0088e486d4a 100644 --- a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java +++ b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java @@ -700,12 +700,12 @@ public sealed interface StructuredTaskScope * } * } * - * var joiner = Joiner.all(new CancelAfterTwoFailures()); + * var joiner = Joiner.allUntil(new CancelAfterTwoFailures()); * } * *

The following example uses {@code allUntil} to wait for all subtasks to * complete without any cancellation. This is similar to {@link #awaitAll()} - * except that it yields a stream of the completed subtasks. + * except that it yields a list of the completed subtasks. * {@snippet lang=java : * List> invokeAll(Collection> tasks) throws InterruptedException { * try (var scope = StructuredTaskScope.open(Joiner.allUntil(_ -> false))) {