On Mon, 22 Feb 2021 17:48:37 GMT, Jonathan Gibbons <[email protected]> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/BackgroundWriter.java
>> line 165:
>>
>>> 163: try {
>>> 164: executor.shutdown();
>>> 165: executor.awaitTermination(5, TimeUnit.MINUTES);
>>
>> The writer can safely read the `taskBusy` field if `awaitTermination`
>> returns `true`. Please check that boolean status.
>
> I don't understand why you think it is important to check `taskBusy`. If
> nothing else, this is only in the verbose/utilization code.
`taskBusy` is accessed from multiple threads. Since those accesses are
conflicting they should be correctly synchronized, which currently they are
not. Also see: https://github.com/openjdk/jdk/pull/2665#issuecomment-783378558
-------------
PR: https://git.openjdk.java.net/jdk/pull/2665