3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
|
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
< |
import java.util.concurrent.ExecutionException; |
6 |
> |
import java.util.HashSet; |
7 |
|
import java.util.concurrent.CancellationException; |
8 |
+ |
import java.util.concurrent.ExecutionException; |
9 |
|
import java.util.concurrent.ForkJoinPool; |
10 |
|
import java.util.concurrent.ForkJoinTask; |
10 |
– |
import java.util.concurrent.ForkJoinWorkerThread; |
11 |
|
import java.util.concurrent.RecursiveAction; |
12 |
– |
import java.util.concurrent.TimeUnit; |
12 |
|
import java.util.concurrent.TimeoutException; |
13 |
|
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; |
14 |
|
import static java.util.concurrent.TimeUnit.MILLISECONDS; |
15 |
|
import static java.util.concurrent.TimeUnit.SECONDS; |
17 |
– |
import java.util.HashSet; |
16 |
|
import junit.framework.*; |
17 |
|
|
18 |
|
public class ForkJoinTaskTest extends JSR166TestCase { |
916 |
|
} |
917 |
|
|
918 |
|
/** |
919 |
< |
* invokeAll(collection) throws exception if any task does |
919 |
> |
* invokeAll(collection) throws exception if any task does |
920 |
|
*/ |
921 |
|
public void testAbnormalInvokeAllCollection() { |
922 |
|
RecursiveAction a = new CheckedRecursiveAction() { |
1583 |
|
} |
1584 |
|
|
1585 |
|
/** |
1586 |
< |
* invokeAll(collection) throws exception if any task does |
1586 |
> |
* invokeAll(collection) throws exception if any task does |
1587 |
|
*/ |
1588 |
|
public void testAbnormalInvokeAllCollectionSingleton() { |
1589 |
|
RecursiveAction a = new CheckedRecursiveAction() { |
1605 |
|
testInvokeOnPool(singletonPool(), a); |
1606 |
|
} |
1607 |
|
|
1610 |
– |
|
1608 |
|
/** |
1609 |
|
* ForkJoinTask.quietlyComplete returns when task completes |
1610 |
|
* normally without setting a value. The most recent value |