--- jsr166/src/jsr166y/CountedCompleter.java 2012/10/30 16:05:35 1.7 +++ jsr166/src/jsr166y/CountedCompleter.java 2012/11/09 03:30:03 1.9 @@ -429,18 +429,8 @@ public abstract class CountedCompleter root = a.getRoot(); - Thread thread = Thread.currentThread(); - ForkJoinPool.WorkQueue wq = - (thread instanceof ForkJoinWorkerThread) ? - ((ForkJoinWorkerThread)thread).workQueue : null; - ForkJoinTask t; - while ((t = (wq != null) ? wq.popCC(root) : - ForkJoinPool.popCCFromCommonPool(root)) != null) { - t.doExec(); - if (root.isDone()) - break; - } + if (!(Thread.currentThread() instanceof ForkJoinWorkerThread)) + ForkJoinPool.popAndExecCCFromCommonPool(a); return; } }