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

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

# Line 429 | 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();
434 <                ForkJoinPool.WorkQueue wq =
435 <                    (thread instanceof ForkJoinWorkerThread) ?
436 <                    ((ForkJoinWorkerThread)thread).workQueue : null;
437 <                ForkJoinTask<?> t;
438 <                while ((t = (wq != null) ? wq.popCC(root) :
439 <                        ForkJoinPool.popCCFromCommonPool(root)) != null) {
440 <                    t.doExec();
441 <                    if (root.isDone())
442 <                        break;
443 <                }
432 >                if (!(Thread.currentThread() instanceof ForkJoinWorkerThread))
433 >                    ForkJoinPool.popAndExecCCFromCommonPool(a);
434                  return;
435              }
436          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines