493 |
|
* #inForkJoinPool}). Attempts to invoke in other contexts result |
494 |
|
* in exceptions or errors, possibly including ClassCastException. |
495 |
|
* |
496 |
< |
* @return <code>this</code>, to simplify usage. |
496 |
> |
* @return {@code this}, to simplify usage. |
497 |
|
*/ |
498 |
|
public final ForkJoinTask<V> fork() { |
499 |
|
((ForkJoinWorkerThread) Thread.currentThread()) |
1042 |
|
// adaptors |
1043 |
|
|
1044 |
|
/** |
1045 |
< |
* Returns a new ForkJoinTask that performs the <code>run</code> |
1045 |
> |
* Returns a new ForkJoinTask that performs the {@code run} |
1046 |
|
* method of the given Runnable as its action, and returns a null |
1047 |
< |
* result upon <code>join</code>. |
1047 |
> |
* result upon {@code join}. |
1048 |
|
* |
1049 |
|
* @param runnable the runnable action |
1050 |
|
* @return the task |
1054 |
|
} |
1055 |
|
|
1056 |
|
/** |
1057 |
< |
* Returns a new ForkJoinTask that performs the <code>run</code> |
1057 |
> |
* Returns a new ForkJoinTask that performs the {@code run} |
1058 |
|
* method of the given Runnable as its action, and returns the |
1059 |
< |
* given result upon <code>join</code>. |
1059 |
> |
* given result upon {@code join}. |
1060 |
|
* |
1061 |
|
* @param runnable the runnable action |
1062 |
|
* @param result the result upon completion |
1067 |
|
} |
1068 |
|
|
1069 |
|
/** |
1070 |
< |
* Returns a new ForkJoinTask that performs the <code>call</code> |
1070 |
> |
* Returns a new ForkJoinTask that performs the {@code call} |
1071 |
|
* method of the given Callable as its action, and returns its |
1072 |
< |
* result upon <code>join</code>, translating any checked |
1073 |
< |
* exceptions encountered into <code>RuntimeException<code>. |
1072 |
> |
* result upon {@code join}, translating any checked |
1073 |
> |
* exceptions encountered into {@code RuntimeException}. |
1074 |
|
* |
1075 |
|
* @param callable the callable action |
1076 |
|
* @return the task |
1149 |
|
} |
1150 |
|
|
1151 |
|
private static final sun.misc.Unsafe UNSAFE = getUnsafe(); |
1152 |
< |
static final long statusOffset = |
1152 |
> |
private static final long statusOffset = |
1153 |
|
fieldOffset("status", ForkJoinTask.class); |
1154 |
|
|
1155 |
|
} |