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

Comparing jsr166/src/main/java/util/concurrent/ForkJoinPool.java (file contents):
Revision 1.27 by jsr166, Wed Sep 1 06:41:55 2010 UTC vs.
Revision 1.28 by jsr166, Wed Sep 1 20:12:39 2010 UTC

# Line 344 | Line 344 | public class ForkJoinPool extends Abstra
344       * "while ((local = field) != 0)") which are usually the simplest
345       * way to ensure the required read orderings (which are sometimes
346       * critical). Also several occurrences of the unusual "do {}
347 <     * while(!cas...)" which is the simplest way to force an update of
347 >     * while (!cas...)" which is the simplest way to force an update of
348       * a CAS'ed variable. There are also other coding oddities that
349       * help some methods perform reasonably even when interpreted (not
350       * compiled), at the expense of some messy constructions that
# Line 830 | Line 830 | public class ForkJoinPool extends Abstra
830              UNSAFE.compareAndSwapInt(this, spareWaitersOffset,
831                                       sw, w.nextSpare)) {
832              int c; // increment running count before resume
833 <            do {} while(!UNSAFE.compareAndSwapInt
834 <                        (this, workerCountsOffset,
835 <                         c = workerCounts, c + ONE_RUNNING));
833 >            do {} while (!UNSAFE.compareAndSwapInt
834 >                         (this, workerCountsOffset,
835 >                          c = workerCounts, c + ONE_RUNNING));
836              if (w.tryUnsuspend())
837                  LockSupport.unpark(w);
838              else   // back out if w was shutdown
# Line 1719 | Line 1719 | public class ForkJoinPool extends Abstra
1719          throws InterruptedException {
1720          try {
1721              return termination.awaitAdvanceInterruptibly(0, timeout, unit) > 0;
1722 <        } catch(TimeoutException ex) {
1722 >        } catch (TimeoutException ex) {
1723              return false;
1724          }
1725      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines