On Tue, 20 Oct 2026 07:20:41 GMT, Alan Bateman <[email protected]> wrote:
>> Viktor Klang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Switch to try-with-resources + respect thread interruption
>
> test/jdk/java/util/concurrent/forkjoin/AsyncShutdownNowInvokeAnyRace.java
> line 139:
>
>> 137: throw new AssertionError(detail, ex);
>> 138: }
>> 139: } finally {
>
> Alternatively change the outer `try` to `try (pool)` as close will do the
> shutdown and wait for the threads to terminate.
Great suggestion, Alan. I did that and augmented the test to respect thread
interruption so that if the test runner issues an interrupt, the test will
throw InterruptedException and fail.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33453#discussion_r4323839886