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

Comparing jsr166/src/jsr166e/ForkJoinPool.java (file contents):
Revision 1.58 by dl, Wed Jun 19 14:55:40 2013 UTC vs.
Revision 1.62 by jsr166, Fri Jul 19 19:34:43 2013 UTC

# Line 18 | Line 18 | import java.util.concurrent.ExecutorServ
18   import java.util.concurrent.Future;
19   import java.util.concurrent.RejectedExecutionException;
20   import java.util.concurrent.RunnableFuture;
21 import java.util.concurrent.ThreadLocalRandom;
21   import java.util.concurrent.TimeUnit;
22  
23   /**
# Line 531 | Line 530 | public class ForkJoinPool extends Abstra
530           * Returns a new worker thread operating in the given pool.
531           *
532           * @param pool the pool this thread works in
534         * @throws NullPointerException if the pool is null
533           * @return the new worker thread
534 +         * @throws NullPointerException if the pool is null
535           */
536          public ForkJoinWorkerThread newThread(ForkJoinPool pool);
537      }
# Line 878 | Line 877 | public class ForkJoinPool extends Abstra
877                  }
878              }
879          }
880 <      
880 >
881          /**
882           * If present, removes from queue and executes the given task,
883           * or any other cancelled task. Returns (true) on any CAS
# Line 1386 | Line 1385 | public class ForkJoinPool extends Abstra
1385          if (wt != null && (w = wt.workQueue) != null) {
1386              int ps; long sc;
1387              w.qlock = -1;                // ensure set
1388 <            do {} while(!U.compareAndSwapLong(this, STEALCOUNT, sc = stealCount,
1389 <                                              sc + w.nsteals));
1388 >            do {} while (!U.compareAndSwapLong(this, STEALCOUNT,
1389 >                                               sc = stealCount,
1390 >                                               sc + w.nsteals));
1391              if (((ps = plock) & PL_LOCK) != 0 ||
1392                  !U.compareAndSwapInt(this, PLOCK, ps, ps += PL_LOCK))
1393                  ps = acquirePlock();
# Line 1733 | Line 1733 | public class ForkJoinPool extends Abstra
1733              else if ((ns = w.nsteals) != 0) { // collect steals and retry
1734                  long sc;
1735                  w.nsteals = 0;
1736 <                do {} while(!U.compareAndSwapLong(this, STEALCOUNT,
1737 <                                                  sc = stealCount, sc + ns));
1736 >                do {} while (!U.compareAndSwapLong(this, STEALCOUNT,
1737 >                                                   sc = stealCount, sc + ns));
1738              }
1739              else {
1740                  long pc = ((d > 0 || ec != (e | INT_SIGN)) ? 0L :
# Line 3281 | Line 3281 | public class ForkJoinPool extends Abstra
3281          ForkJoinWorkerThreadFactory factory
3282              = defaultForkJoinWorkerThreadFactory;
3283          UncaughtExceptionHandler handler = null;
3284 <        try {  // ignore exceptions in accesing/parsing properties
3284 >        try {  // ignore exceptions in accessing/parsing properties
3285              String pp = System.getProperty
3286                  ("java.util.concurrent.ForkJoinPool.common.parallelism");
3287              String fp = System.getProperty

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines