-
CSR
-
Resolution: Approved
-
P3
-
None
-
minimal
-
Docs only change
-
Java API
-
SE
Summary
Update the java.util.concurrent.SubmissionPublisher
no-arg constructor to document that it does not special case parallelism < 2.
Problem
The changes in JDK-8319447 to improve the performance of delayed task handling updated CompletableFuture
and SubmissionPublisher
to use the ForkJoinPool commonPool in all cases. These APIs previously created a Thread for each task when parallelism was less than 2. We missed the update to SubmissionPublisher no-arg constructor in that update.
Solution
Update SubmissionPublisher's no-arg constructor to specify that it uses the ForkJoinPool.commonPool in all cases.
Specification
/**
* Creates a new SubmissionPublisher using the {@link
- * ForkJoinPool#commonPool()} for async delivery to subscribers
- * (unless it does not support a parallelism level of at least two,
- * in which case, a new Thread is created to run each task), with
+ * ForkJoinPool#commonPool()} for async delivery to subscribers, with
* maximum buffer capacity of {@link Flow#defaultBufferSize}, and no
* handler for Subscriber exceptions in method {@link
* Flow.Subscriber#onNext(Object) onNext}.
- csr of
-
JDK-8362882 Update SubmissionPublisher() specification to reflect use of ForkJoinPool.asyncCommonPool()
-
- Resolved
-