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.9 by dl, Tue Oct 30 14:23:03 2012 UTC vs.
Revision 1.10 by jsr166, Tue Oct 30 16:05:35 2012 UTC

# Line 1418 | Line 1418 | public class ForkJoinPool extends Abstra
1418       */
1419      final String nextWorkerName() {
1420          int n;
1421 <        do {} while(!U.compareAndSwapInt(this, NEXTWORKERNUMBER,
1422 <                                         n = nextWorkerNumber, ++n));
1421 >        do {} while (!U.compareAndSwapInt(this, NEXTWORKERNUMBER,
1422 >                                          n = nextWorkerNumber, ++n));
1423          return workerNamePrefix.concat(Integer.toString(n));
1424      }
1425  
# Line 1482 | Line 1482 | public class ForkJoinPool extends Abstra
1482          if (wt != null && (w = wt.workQueue) != null) {
1483              w.runState = -1;                // ensure runState is set
1484              long steals = w.totalSteals + w.nsteals, sc;
1485 <            do {} while(!U.compareAndSwapLong(this, STEALCOUNT,
1486 <                                              sc = stealCount, sc + steals));
1485 >            do {} while (!U.compareAndSwapLong(this, STEALCOUNT,
1486 >                                               sc = stealCount, sc + steals));
1487              int idx = w.poolIndex;
1488              while (!U.compareAndSwapInt(this, MAINLOCK, 0, 1))
1489                  tryAwaitMainLock();
# Line 2276 | Line 2276 | public class ForkJoinPool extends Abstra
2276          for (long c;;) {
2277              if (((c = ctl) & STOP_BIT) != 0) {      // already terminating
2278                  if ((short)(c >>> TC_SHIFT) == -parallelism) {
2279 <                    synchronized(this) {
2279 >                    synchronized (this) {
2280                          notifyAll();                // signal when 0 workers
2281                      }
2282                  }
# Line 3000 | Line 3000 | public class ForkJoinPool extends Abstra
3000              return true;
3001          long startTime = System.nanoTime();
3002          boolean terminated = false;
3003 <        synchronized(this) {
3003 >        synchronized (this) {
3004              for (long waitTime = nanos, millis = 0L;;) {
3005                  if (terminated = isTerminated() ||
3006                      waitTime <= 0L ||
# Line 3185 | Line 3185 | public class ForkJoinPool extends Abstra
3185                  defaultForkJoinWorkerThreadFactory :
3186                  ((ForkJoinWorkerThreadFactory)ClassLoader.
3187                   getSystemClassLoader().loadClass(fp).newInstance());
3188 <            Thread.UncaughtExceptionHandler ueh = (up == null)? null :
3188 >            Thread.UncaughtExceptionHandler ueh = (up == null) ? null :
3189                  ((Thread.UncaughtExceptionHandler)ClassLoader.
3190                   getSystemClassLoader().loadClass(up).newInstance());
3191              int par;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines