278 |
|
} |
279 |
|
|
280 |
|
/** |
281 |
< |
* Blocks a non-worker-thread until completion or interruption or timeout |
281 |
> |
* Blocks a non-worker-thread until completion or interruption or timeout. |
282 |
|
*/ |
283 |
|
private void externalInterruptibleAwaitDone(boolean timed, long nanos) |
284 |
|
throws InterruptedException { |
842 |
|
} |
843 |
|
|
844 |
|
/** |
845 |
< |
* Returns {@code true} if the current thread is executing as a |
846 |
< |
* ForkJoinPool computation. |
845 |
> |
* Returns {@code true} if the current thread is a {@link |
846 |
> |
* ForkJoinWorkerThread} executing as a ForkJoinPool computation. |
847 |
|
* |
848 |
< |
* @return {@code true} if the current thread is executing as a |
849 |
< |
* ForkJoinPool computation, or false otherwise |
848 |
> |
* @return {@code true} if the current thread is a {@link |
849 |
> |
* ForkJoinWorkerThread} executing as a ForkJoinPool computation, |
850 |
> |
* or {@code false} otherwise |
851 |
|
*/ |
852 |
|
public static boolean inForkJoinPool() { |
853 |
|
return Thread.currentThread() instanceof ForkJoinWorkerThread; |