mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8264572: ForkJoinPool.getCommonPoolParallelism() reports always 1
Reviewed-by: alanb
This commit is contained in:
parent
9c283da175
commit
cec66cf8ef
1 changed files with 1 additions and 0 deletions
|
@ -2572,6 +2572,7 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
this.saturate = null;
|
||||
this.workerNamePrefix = null;
|
||||
int p = Math.min(Math.max(parallelism, 0), MAX_CAP), size;
|
||||
this.mode = p;
|
||||
if (p > 0) {
|
||||
size = 1 << (33 - Integer.numberOfLeadingZeros(p - 1));
|
||||
this.bounds = ((1 - p) & SMASK) | (COMMON_MAX_SPARES << SWIDTH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue