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

Comparing jsr166/src/jsr166e/CountedCompleter.java (file contents):
Revision 1.6 by jsr166, Tue Oct 30 16:05:35 2012 UTC vs.
Revision 1.7 by dl, Wed Oct 31 12:49:13 2012 UTC

# Line 5 | Line 5
5   */
6  
7   package jsr166e;
8 +
9   /**
10   * A {@link ForkJoinTask} with a completion action
11   * performed when triggered and there are no remaining pending
# Line 428 | Line 429 | public abstract class CountedCompleter<T
429                  }
430              }
431              else if (U.compareAndSwapInt(a, PENDING, c, c - 1)) {
432 <                CountedCompleter<?> root = a.getRoot();
433 <                Thread thread = Thread.currentThread();
433 <                ForkJoinPool.WorkQueue wq =
434 <                    (thread instanceof ForkJoinWorkerThread) ?
435 <                    ((ForkJoinWorkerThread)thread).workQueue : null;
436 <                ForkJoinTask<?> t;
437 <                while ((t = (wq != null) ? wq.popCC(root) :
438 <                        ForkJoinPool.popCCFromCommonPool(root)) != null) {
439 <                    t.doExec();
440 <                    if (root.isDone())
441 <                        break;
442 <                }
432 >                if (!(Thread.currentThread() instanceof ForkJoinWorkerThread))
433 >                    ForkJoinPool.popAndExecCCFromCommonPool(a);
434                  return;
435              }
436          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines