On Thu, 15 Aug 2024 15:41:21 GMT, Pavel Rappo <pra...@openjdk.org> wrote:
>> 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. > > That comment is not javadoc, so no need for markup. Although, I agree that > this trailing "s" reads ugly because it interferes with the class name. It would also be OK to just drop that "s" -> InterruptedException. >> 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.” > > I'd leave it to @DougLea. The extra "if" doesn't seem to add clarity. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20584#discussion_r1719761582 PR Review Comment: https://git.openjdk.org/jdk/pull/20584#discussion_r1719762896