Skip to content

Commit cec66cf

Browse files
author
Doug Lea
committed
8264572: ForkJoinPool.getCommonPoolParallelism() reports always 1
Reviewed-by: alanb
1 parent 9c283da commit cec66cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,6 +2572,7 @@ private ForkJoinPool(byte forCommonPoolOnly) {
25722572
this.saturate = null;
25732573
this.workerNamePrefix = null;
25742574
int p = Math.min(Math.max(parallelism, 0), MAX_CAP), size;
2575+
this.mode = p;
25752576
if (p > 0) {
25762577
size = 1 << (33 - Integer.numberOfLeadingZeros(p - 1));
25772578
this.bounds = ((1 - p) & SMASK) | (COMMON_MAX_SPARES << SWIDTH);

0 commit comments

Comments
 (0)