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.192 by jsr166, Fri Jul 19 19:34:43 2013 UTC vs.
Revision 1.193 by dl, Wed Aug 7 14:31:03 2013 UTC

# Line 115 | Line 115 | import java.util.concurrent.TimeUnit;
115   * Upon any error in establishing these settings, default parameters
116   * are used. It is possible to disable or limit the use of threads in
117   * the common pool by setting the parallelism property to zero, and/or
118 < * using a factory that may return {@code null}.
118 > * using a factory that may return {@code null}. However doing so may
119 > * cause unjoined tasks to never be executed.
120   *
121   * <p><b>Implementation notes</b>: This implementation restricts the
122   * maximum number of running threads to 32767. Attempts to create
# Line 1125 | Line 1126 | public class ForkJoinPool extends Abstra
1126       * Increment for seed generators. See class ThreadLocal for
1127       * explanation.
1128       */
1129 <    private static final int SEED_INCREMENT = 0x61c88647;
1129 >    private static final int SEED_INCREMENT = 0x9e3779b9;
1130  
1131      /*
1132       * Bits and masks for control variables
# Line 3274 | Line 3275 | public class ForkJoinPool extends Abstra
3275          }
3276  
3277          if (parallelism < 0 && // default 1 less than #cores
3278 <            (parallelism = Runtime.getRuntime().availableProcessors() - 1) < 0)
3279 <            parallelism = 0;
3278 >            (parallelism = Runtime.getRuntime().availableProcessors() - 1) <= 0)
3279 >            parallelism = 1;
3280          if (parallelism > MAX_CAP)
3281              parallelism = MAX_CAP;
3282          return new ForkJoinPool(parallelism, factory, handler, LIFO_QUEUE,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines