8371815: API docs for 2-arg StructuredTaskScope.open should say timeout may expire before or while waiting in join

Reviewed-by: vklang
This commit is contained in:
Alan Bateman 2025-11-27 14:17:13 +00:00
parent da8e41a368
commit 6901c05c9d

View File

@ -914,8 +914,8 @@ public sealed interface StructuredTaskScope<T, R>
* forking subtasks will create an unnamed virtual thread for each subtask.
*
* <p> If a {@linkplain Configuration#withTimeout(Duration) timeout} is set then it
* starts when the scope is opened. If the timeout expires before the scope has
* {@linkplain #join() joined} then the scope is {@linkplain ##Cancellation cancelled}
* starts when the scope is opened. If the timeout expires before or while waiting in
* {@link #join()} then the scope is {@linkplain ##Cancellation cancelled}
* and the {@code Joiner}'s {@link Joiner#onTimeout() onTimeout()} method is invoked
* to optionally throw {@link TimeoutException TimeoutException}.
*