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 |
|
} |