On Wed, 15 Apr 2026 15:07:33 GMT, Alan Bateman <[email protected]> wrote:

>> src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java 
>> line 966:
>> 
>>> 964:          *
>>> 965:          * <p> The predicate's {@code test(Object)} method must be 
>>> thread safe as it may
>>> 966:          * be invoked concurrently from several threads. If the {@code 
>>> test(Object)} method
>> 
>> @AlanBateman Not sure about the wording here, a Predicate doesn't 
>> "complete". Perhaps say something like "of invoking the test(Object) method 
>> throws an exception or error"?s
>
> I can't immediately see the issue here. The wording is "If the test(Object) 
> method completes with an exception or error" (it used to say "If the test 
> method completes with an exception or error"). We could change to "completely 
> abnormally" or "fails with". In other areas of the API docs we speak of a 
> subtask failing with an exception or error so maybe that is best.

Yeah, I'd want to separate the wording between subtasks (that complete) and 
functions (that produce a value or throw).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/30695#discussion_r3087547752

Reply via email to