9 |
|
import java.util.concurrent.SynchronousQueue; |
10 |
|
import java.util.concurrent.ExecutionException; |
11 |
|
import java.util.concurrent.ForkJoinPool; |
12 |
+ |
import java.util.concurrent.ForkJoinTask; |
13 |
|
import java.util.concurrent.ForkJoinWorkerThread; |
14 |
|
import java.util.concurrent.RecursiveAction; |
15 |
|
import java.util.concurrent.TimeUnit; |
61 |
|
assertNull(a.getException()); |
62 |
|
assertNull(a.getRawResult()); |
63 |
|
|
64 |
< |
if (! (Thread.currentThread() instanceof ForkJoinWorkerThread)) { |
64 |
> |
if (! ForkJoinTask.inForkJoinPool()) { |
65 |
|
Thread.currentThread().interrupt(); |
66 |
|
try { |
67 |
|
a.get(); |
352 |
|
// test join() ------------ |
353 |
|
|
354 |
|
f = fibActions[0]; |
355 |
< |
assertFalse(f.inForkJoinPool()); |
355 |
> |
assertFalse(ForkJoinTask.inForkJoinPool()); |
356 |
|
Thread.currentThread().interrupt(); |
357 |
|
assertNull(f.join()); |
358 |
|
assertTrue(Thread.interrupted()); |