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

Comparing jsr166/src/jsr166y/ForkJoinPool.java (file contents):
Revision 1.137 by dl, Tue Oct 30 14:23:11 2012 UTC vs.
Revision 1.138 by jsr166, Tue Oct 30 16:05:35 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines