mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8365671: Typo in Joiner.allUntil example
Reviewed-by: liach
This commit is contained in:
parent
9041f4c47f
commit
be6c15ecb4
@ -700,12 +700,12 @@ public sealed interface StructuredTaskScope<T, R>
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* var joiner = Joiner.all(new CancelAfterTwoFailures<String>());
|
||||
* var joiner = Joiner.allUntil(new CancelAfterTwoFailures<String>());
|
||||
* }
|
||||
*
|
||||
* <p> 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 :
|
||||
* <T> List<Subtask<T>> invokeAll(Collection<Callable<T>> tasks) throws InterruptedException {
|
||||
* try (var scope = StructuredTaskScope.open(Joiner.<T>allUntil(_ -> false))) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user