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.105 by jsr166, Fri Jun 10 18:10:53 2011 UTC vs.
Revision 1.108 by jsr166, Fri Jul 1 18:09:08 2011 UTC

# Line 465 | Line 465 | public class ForkJoinPool extends Abstra
465      /**
466       * Main pool control -- a long packed with:
467       * AC: Number of active running workers minus target parallelism (16 bits)
468 <     * TC: Number of total workers minus target parallelism (16bits)
468 >     * TC: Number of total workers minus target parallelism (16 bits)
469       * ST: true if pool is terminating (1 bit)
470       * EC: the wait count of top waiting thread (15 bits)
471       * ID: ~poolIndex of top of Treiber stack of waiting threads (16 bits)
# Line 545 | Line 545 | public class ForkJoinPool extends Abstra
545      volatile boolean shutdown;
546  
547      /**
548 <     * True if use local fifo, not default lifo, for local polling
549 <     * Read by, and replicated by ForkJoinWorkerThreads
548 >     * True if use local fifo, not default lifo, for local polling.
549 >     * Read by, and replicated by ForkJoinWorkerThreads.
550       */
551      final boolean locallyFifo;
552  
# Line 784 | Line 784 | public class ForkJoinPool extends Abstra
784          long nc = (long)(v & E_MASK) | ((c - AC_UNIT) & (AC_MASK|TC_MASK));
785          if (ctl != c || !UNSAFE.compareAndSwapLong(this, ctlOffset, c, nc)) {
786              long d = ctl; // return true if lost to a deq, to force scan
787 <            return (int)d != (int)c && ((d - c) & AC_MASK) >= 0L;
787 >            return (int)d != (int)c && (d & AC_MASK) >= (c & AC_MASK);
788          }
789          for (int sc = w.stealCount; sc != 0;) {   // accumulate stealCount
790              long s = stealCount;
# Line 1321 | Line 1321 | public class ForkJoinPool extends Abstra
1321      // misc ForkJoinWorkerThread support
1322  
1323      /**
1324 <     * Increment or decrement quiescerCount. Needed only to prevent
1324 >     * Increments or decrements quiescerCount. Needed only to prevent
1325       * triggering shutdown if a worker is transiently inactive while
1326       * checking quiescence.
1327       *
# Line 1334 | Line 1334 | public class ForkJoinPool extends Abstra
1334      }
1335  
1336      /**
1337 <     * Directly increment or decrement active count without
1338 <     * queuing. This method is used to transiently assert inactivation
1339 <     * while checking quiescence.
1337 >     * Directly increments or decrements active count without queuing.
1338 >     * This method is used to transiently assert inactivation while
1339 >     * checking quiescence.
1340       *
1341       * @param delta 1 for increment, -1 for decrement
1342       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines