ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ForkJoinPool.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ForkJoinPool.java (file contents):
Revision 1.402 by jsr166, Wed Sep 29 03:40:19 2021 UTC vs.
Revision 1.403 by dl, Thu Sep 30 17:29:05 2021 UTC

# Line 2524 | Line 2524 | public class ForkJoinPool extends Abstra
2524       * overridden by system properties
2525       */
2526      private ForkJoinPool(byte forCommonPoolOnly) {
2527 <        int parallelism = Runtime.getRuntime().availableProcessors() - 1;
2527 >        int parallelism = Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
2528          ForkJoinWorkerThreadFactory fac = null;
2529          UncaughtExceptionHandler handler = null;
2530          try {  // ignore exceptions in accessing/parsing properties

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines