JDK-8362882 : Update SubmissionPublisher() specification to reflect use of ForkJoinPool.asyncCommonPool()
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.concurrent
  • Affected Version: 25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-07-21
  • Updated: 2025-08-02
  • Resolved: 2025-07-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25 JDK 26
25Fixed 26 b09Fixed
Related Reports
CSR :  
Relates :  
Description
The implementation of SubmissionPublisher() was updated as part of JDK-8350493: Improve performance of delayed task handling. This change removed the use of a conditionally selected executor (ASYNC_POOL) and replaced it with a consistent use of ForkJoinPool.asyncCommonPool():

public SubmissionPublisher() {
    this(ForkJoinPool.asyncCommonPool(), Flow.defaultBufferSize(), null);
}

Previously, the executor used was defined as:

private static final Executor ASYNC_POOL =
    (ForkJoinPool.getCommonPoolParallelism() > 1)
    ? ForkJoinPool.commonPool() : new ThreadPerTaskExecutor();

This change avoids the overhead of spawning a new thread for each task when ForkJoinPool.commonPool() has zero parallelism. It provides a more consistent and performant behavior for asynchronous task execution.

However, the Javadoc specification of the SubmissionPublisher() constructor still describes behavior in terms of the previously conditional logic based on the parallelism level of the common pool.

Request
The Javadoc specification of the no-arg constructor SubmissionPublisher() still reflects the old behavior that depended on the common pool’s parallelism level. Since the implementation now always uses ForkJoinPool.asyncCommonPool(), the specification must be updated to:

Reflect the consistent use of the asynchronous common pool.
Remove any mention of conditional logic based on ForkJoinPool.getCommonPoolParallelism().
Comments
A pull request was submitted for review. Branch: jdk25 URL: https://git.openjdk.org/jdk/pull/26474 Date: 2025-07-25 08:20:05 +0000
25-07-2025

Changeset: f79bd54b Branch: master Author: Alan Bateman <alanb@openjdk.org> Date: 2025-07-25 08:11:55 +0000 URL: https://git.openjdk.org/jdk/commit/f79bd54bbb9f5748e437346d34702608f7b67019
25-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26426 Date: 2025-07-22 13:13:41 +0000
23-07-2025

JDK 25 is currently in Rampdown Phase 2 (RDP2). Docs only changes are allowed in RDP2 without additional approval.
21-07-2025