--- jsr166/src/jsr166e/ForkJoinPool.java 2013/01/28 17:31:35 1.50 +++ jsr166/src/jsr166e/ForkJoinPool.java 2013/02/05 19:54:06 1.55 @@ -708,7 +708,7 @@ public class ForkJoinPool extends Abstra * shared-queue version is embedded in method externalPush.) * * @param task the task. Caller must ensure non-null. - * @throw RejectedExecutionException if array cannot be resized + * @throws RejectedExecutionException if array cannot be resized */ final void push(ForkJoinTask task) { ForkJoinTask[] a; ForkJoinPool p; @@ -907,7 +907,7 @@ public class ForkJoinPool extends Abstra * or any other cancelled task. Returns (true) on any CAS * or consistency check failure so caller can retry. * - * @return false if no progress can be made, else true; + * @return false if no progress can be made, else true */ final boolean tryRemoveAndExec(ForkJoinTask task) { boolean stat = true, removed = false, empty = true; @@ -952,7 +952,7 @@ public class ForkJoinPool extends Abstra /** * Polls for and executes the given task or any other task in - * its CountedCompleter computation + * its CountedCompleter computation. */ final boolean pollAndExecCC(ForkJoinTask root) { ForkJoinTask[] a; int b; Object o; @@ -2466,7 +2466,7 @@ public class ForkJoinPool extends Abstra * java.lang.RuntimePermission}{@code ("modifyThread")} */ public ForkJoinPool() { - this(Runtime.getRuntime().availableProcessors(), + this(Math.min(MAX_CAP, Runtime.getRuntime().availableProcessors()), defaultForkJoinWorkerThreadFactory, null, false); } @@ -3166,7 +3166,7 @@ public class ForkJoinPool extends Abstra /** * Waits and/or attempts to assist performing tasks indefinitely - * until the {@link #commonPool()} {@link #isQuiescent} + * until the {@link #commonPool()} {@link #isQuiescent}. */ static void quiesceCommonPool() { common.awaitQuiescence(Long.MAX_VALUE, TimeUnit.NANOSECONDS);