On Thu, 15 Aug 2024 08:28:24 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> This PR fixes a few trivial grammar issues and typos in documentation.
>> 
>> The main issue is the use of the word "timeout". To my mind, timeout, a 
>> duration, is not the same as deadline, which is a point in time, an instant, 
>> which allows "before" and "after". While one can think of timeout as of an 
>> event, which can occur, it usually expires, or elapses. An activity can also 
>> "time out" (phrasal verb).
>> 
>> I think the proposed change might read better and match wording already used 
>> throughout `java.util.concurrent.**`, for example, here:  
>> 
>> * 
>> https://github.com/openjdk/jdk/blob/00e6c63cd12e3f92d0c1d007aab4f74915616ffb/src/java.base/share/classes/java/util/concurrent/ExecutorService.java#L211-L223
>> * 
>> https://github.com/openjdk/jdk/blob/fbe4cc96e223882a18c7ff666fe6f68b3fa2cfe4/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java#L1019-L1036
>>  
>> 
>> @DougLea, thoughts?
>
> Pavel Rappo has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Fix grammatical tense

Marked as reviewed by aivanov (Reviewer).

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 858:

> 856:      * usages of ForkJoinTasks ignore interrupt status when executing
> 857:      * or awaiting completion.  Otherwise, reporting task results or
> 858:      * exceptions is preferred to throwing InterruptedExceptions,

I wonder whether _“InterruptedExceptions”_ should be marked up with `{@code 
InterruptedException}`s to refer to the class. As far as I can see, classes and 
methods aren't marked up with `{@code}` here, so it's better to leave it as is.

src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java line 1076:

> 1074:      * Tries to join this task, returning true if it completed
> 1075:      * (possibly exceptionally) before the given timeout elapsed and
> 1076:      * the current thread has not been interrupted.

Suggestion:

     * (possibly exceptionally) before the given timeout elapsed and if
     * the current thread has not been interrupted.

Would it be clearer with another _“if”_? I assume, the meaning is “…returning 
true if it completed … and if the current thread has not been interrupted.”

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

PR Review: https://git.openjdk.org/jdk/pull/20584#pullrequestreview-2240653963
PR Review Comment: https://git.openjdk.org/jdk/pull/20584#discussion_r1718569155
PR Review Comment: https://git.openjdk.org/jdk/pull/20584#discussion_r1718579194

Reply via email to