170 |
|
* used in extensions such as remote execution frameworks. It is |
171 |
|
* sensible to serialize tasks only before or after, but not during, |
172 |
|
* execution. Serialization is not relied on during execution itself. |
173 |
– |
* A deserialized task that completed exceptionally in any way reports |
174 |
– |
* a {@code CancellationException}. |
173 |
|
* |
174 |
|
* @since 1.7 |
175 |
|
* @author Doug Lea |
937 |
|
else if ((s = status) >= 0 && nanos > 0L) { |
938 |
|
long d = nanos + System.nanoTime(); |
939 |
|
long deadline = (d == 0L) ? 1L : d; // avoid 0 |
940 |
< |
ForkJoinPool p = null; Thread t; |
941 |
< |
if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread && |
942 |
< |
(p = ((ForkJoinWorkerThread)t).pool) != null && |
943 |
< |
p.preCompensate() == 0) |
940 |
> |
Thread t = Thread.currentThread(); |
941 |
> |
ForkJoinPool p = (t instanceof ForkJoinWorkerThread) ? |
942 |
> |
((ForkJoinWorkerThread)t).pool : ForkJoinPool.common; |
943 |
> |
if (p != null && p.preCompensate() == 0) |
944 |
|
p = null; |
945 |
|
s = awaitDone(true, deadline, p); |
946 |
|
} |