On Mon, 22 Sep 2025 15:32:30 GMT, Viktor Klang <[email protected]> wrote:

> ForkJoinTask::get and ForkJoinTask::get(timeout, timeunit) now (again) throws 
> CancellationException when cancelled.

test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java line 524:

> 522:             try {
> 523:                 t.set(Thread.currentThread());
> 524:                 c.await();

Using CountDownLatch is a bit subtle here, maybe a 
Thread.sleep(Duration.ofDays(1)) might be clearer. It doesn't matter what 
indefinite wait is used but for the CountDownLatch::await then it might need a 
comment as readers will look around for the call to countDown.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27430#discussion_r2369598483

Reply via email to