435 |
|
} |
436 |
|
|
437 |
|
/** |
438 |
< |
* Records exception and possibly propagates |
438 |
> |
* Records exception and possibly propagates. |
439 |
|
* |
440 |
|
* @return status on exit |
441 |
|
*/ |
606 |
|
throw (Error)ex; |
607 |
|
if (ex instanceof RuntimeException) |
608 |
|
throw (RuntimeException)ex; |
609 |
< |
throw uncheckedThrowable(ex, RuntimeException.class); |
609 |
> |
ForkJoinTask.<RuntimeException>uncheckedThrow(ex); |
610 |
|
} |
611 |
|
} |
612 |
|
|
616 |
|
* unchecked exceptions |
617 |
|
*/ |
618 |
|
@SuppressWarnings("unchecked") static <T extends Throwable> |
619 |
< |
T uncheckedThrowable(final Throwable t, final Class<T> c) { |
620 |
< |
return (T)t; // rely on vacuous cast |
619 |
> |
void uncheckedThrow(Throwable t) throws T { |
620 |
> |
if (t != null) |
621 |
> |
throw (T)t; // rely on vacuous cast |
622 |
|
} |
623 |
|
|
624 |
|
/** |
653 |
|
if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) |
654 |
|
((ForkJoinWorkerThread)t).workQueue.push(this); |
655 |
|
else |
656 |
< |
ForkJoinPool.commonPool.externalPush(this); |
656 |
> |
ForkJoinPool.common.externalPush(this); |
657 |
|
return this; |
658 |
|
} |
659 |
|
|
979 |
|
if (Thread.interrupted()) |
980 |
|
throw new InterruptedException(); |
981 |
|
// Messy in part because we measure in nanosecs, but wait in millisecs |
982 |
< |
int s; long ns, ms; |
983 |
< |
if ((s = status) >= 0 && (ns = unit.toNanos(timeout)) > 0L) { |
982 |
> |
int s; long ms; |
983 |
> |
long ns = unit.toNanos(timeout); |
984 |
> |
if ((s = status) >= 0 && ns > 0L) { |
985 |
|
long deadline = System.nanoTime() + ns; |
986 |
|
ForkJoinPool p = null; |
987 |
|
ForkJoinPool.WorkQueue w = null; |
1077 |
|
wt.pool.helpQuiescePool(wt.workQueue); |
1078 |
|
} |
1079 |
|
else |
1080 |
< |
ForkJoinPool.externalHelpQuiescePool(); |
1080 |
> |
ForkJoinPool.quiesceCommonPool(); |
1081 |
|
} |
1082 |
|
|
1083 |
|
/** |
1502 |
|
} |
1503 |
|
} |
1504 |
|
} |
1505 |
+ |
|
1506 |
|
} |