RFR: 8369656 : Calling CompletableFuture.join() could execute task in common pool [v2]

Andrey Turbanov aturbanov at openjdk.org
Wed Oct 15 08:25:24 UTC 2025


On Tue, 14 Oct 2025 13:10:22 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Addresses the regression regarding pool assistance and includes a regression test for `CompletableFuture::get()`, `CompletableFuture::get(timeout, unit)`, and `CompletableFuture::join()`
>
> Viktor Klang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Improving the name of the regtest

test/jdk/java/util/concurrent/tck/CompletableFutureTest.java line 5153:

> 5151:                             try {
> 5152:                                 return extractor.pool(cf);
> 5153:                             } catch(Exception ex) {

Suggestion:

                            } catch (Exception ex) {

test/jdk/java/util/concurrent/tck/CompletableFutureTest.java line 5170:

> 5168: 
> 5169:         try (var pool = new ForkJoinPool(2)) {
> 5170:             for(var extractor : extractors) {

Suggestion:

            for (var extractor : extractors) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27800#discussion_r2431584607
PR Review Comment: https://git.openjdk.org/jdk/pull/27800#discussion_r2431585306


More information about the core-libs-dev mailing list