ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ForkJoinTask.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ForkJoinTask.java (file contents):
Revision 1.124 by dl, Fri Jan 17 18:12:07 2020 UTC vs.
Revision 1.125 by dl, Sat Jan 18 12:30:04 2020 UTC

# Line 170 | Line 170 | import java.util.concurrent.locks.LockSu
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
# Line 939 | Line 937 | public abstract class ForkJoinTask<V> im
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          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines