--- jsr166/src/jsr166e/ForkJoinPool.java 2013/06/19 14:55:40 1.58 +++ jsr166/src/jsr166e/ForkJoinPool.java 2013/07/19 19:34:43 1.62 @@ -18,7 +18,6 @@ import java.util.concurrent.ExecutorServ import java.util.concurrent.Future; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.RunnableFuture; -import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; /** @@ -531,8 +530,8 @@ public class ForkJoinPool extends Abstra * Returns a new worker thread operating in the given pool. * * @param pool the pool this thread works in - * @throws NullPointerException if the pool is null * @return the new worker thread + * @throws NullPointerException if the pool is null */ public ForkJoinWorkerThread newThread(ForkJoinPool pool); } @@ -878,7 +877,7 @@ public class ForkJoinPool extends Abstra } } } - + /** * If present, removes from queue and executes the given task, * or any other cancelled task. Returns (true) on any CAS @@ -1386,8 +1385,9 @@ public class ForkJoinPool extends Abstra if (wt != null && (w = wt.workQueue) != null) { int ps; long sc; w.qlock = -1; // ensure set - do {} while(!U.compareAndSwapLong(this, STEALCOUNT, sc = stealCount, - sc + w.nsteals)); + do {} while (!U.compareAndSwapLong(this, STEALCOUNT, + sc = stealCount, + sc + w.nsteals)); if (((ps = plock) & PL_LOCK) != 0 || !U.compareAndSwapInt(this, PLOCK, ps, ps += PL_LOCK)) ps = acquirePlock(); @@ -1733,8 +1733,8 @@ public class ForkJoinPool extends Abstra else if ((ns = w.nsteals) != 0) { // collect steals and retry long sc; w.nsteals = 0; - do {} while(!U.compareAndSwapLong(this, STEALCOUNT, - sc = stealCount, sc + ns)); + do {} while (!U.compareAndSwapLong(this, STEALCOUNT, + sc = stealCount, sc + ns)); } else { long pc = ((d > 0 || ec != (e | INT_SIGN)) ? 0L : @@ -3281,7 +3281,7 @@ public class ForkJoinPool extends Abstra ForkJoinWorkerThreadFactory factory = defaultForkJoinWorkerThreadFactory; UncaughtExceptionHandler handler = null; - try { // ignore exceptions in accesing/parsing properties + try { // ignore exceptions in accessing/parsing properties String pp = System.getProperty ("java.util.concurrent.ForkJoinPool.common.parallelism"); String fp = System.getProperty