11 |
|
public class RecursiveTaskTest extends JSR166TestCase { |
12 |
|
|
13 |
|
public static void main(String[] args) { |
14 |
< |
junit.textui.TestRunner.run (suite()); |
14 |
> |
junit.textui.TestRunner.run(suite()); |
15 |
|
} |
16 |
|
public static Test suite() { |
17 |
|
return new TestSuite(RecursiveTaskTest.class); |
19 |
|
|
20 |
|
static final ForkJoinPool mainPool = new ForkJoinPool(); |
21 |
|
static final ForkJoinPool singletonPool = new ForkJoinPool(1); |
22 |
< |
static final ForkJoinPool asyncSingletonPool = |
23 |
< |
new ForkJoinPool(1, ForkJoinPool.defaultForkJoinWorkerThreadFactory, |
22 |
> |
static final ForkJoinPool asyncSingletonPool = |
23 |
> |
new ForkJoinPool(1, ForkJoinPool.defaultForkJoinWorkerThreadFactory, |
24 |
|
null, true); |
25 |
|
|
26 |
|
static final class FJException extends RuntimeException { |
64 |
|
* isCompletedAbnormally and isCancelled return false for normally |
65 |
|
* completed tasks. getRawResult of a completed non-null task |
66 |
|
* returns value; |
67 |
– |
* |
67 |
|
*/ |
68 |
|
public void testInvoke() { |
69 |
|
RecursiveTask<Integer> a = new RecursiveTask<Integer>() { |