596 |
|
public final ForkJoinTask<V> fork() { |
597 |
|
Thread t; ForkJoinWorkerThread wt; |
598 |
|
ForkJoinPool p; ForkJoinPool.WorkQueue q; |
599 |
+ |
U.storeFence(); // ensure safely publishable |
600 |
|
if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) { |
601 |
|
p = (wt = (ForkJoinWorkerThread)t).pool; |
602 |
|
q = wt.workQueue; |
1030 |
|
* @return true if this task completed |
1031 |
|
* @throws InterruptedException if the current thread was |
1032 |
|
* interrupted while waiting |
1033 |
+ |
* @since 19 |
1034 |
|
*/ |
1035 |
|
public final boolean quietlyJoin(long timeout, TimeUnit unit) |
1036 |
|
throws InterruptedException { |
1056 |
|
* @param timeout the maximum time to wait |
1057 |
|
* @param unit the time unit of the timeout argument |
1058 |
|
* @return true if this task completed |
1059 |
+ |
* @since 19 |
1060 |
|
*/ |
1061 |
|
public final boolean quietlyJoinUninterruptibly(long timeout, |
1062 |
|
TimeUnit unit) { |
1550 |
|
* @param <T> the type of the callable's result |
1551 |
|
* @return the task |
1552 |
|
* |
1553 |
< |
* @since 17 |
1553 |
> |
* @since 19 |
1554 |
|
*/ |
1555 |
|
public static <T> ForkJoinTask<T> adaptInterruptible(Callable<? extends T> callable) { |
1556 |
|
// https://bugs.openjdk.java.net/browse/JDK-8246587 |