9 |
|
import java.util.concurrent.ExecutionException; |
10 |
|
import java.util.concurrent.ForkJoinPool; |
11 |
|
import java.util.concurrent.ForkJoinTask; |
12 |
– |
import java.util.concurrent.ForkJoinWorkerThread; |
12 |
|
import java.util.concurrent.RecursiveTask; |
14 |
– |
import java.util.concurrent.TimeUnit; |
13 |
|
import java.util.concurrent.TimeoutException; |
14 |
|
import static java.util.concurrent.TimeUnit.SECONDS; |
15 |
|
import java.util.HashSet; |
317 |
|
assertEquals(21, (int) testInvokeOnPool(mainPool(), a)); |
318 |
|
} |
319 |
|
|
322 |
– |
|
320 |
|
/** |
321 |
|
* helpQuiesce returns when tasks are complete. |
322 |
|
* getQueuedTaskCount returns 0 when quiescent |
334 |
|
assertSame(NoResult, testInvokeOnPool(mainPool(), a)); |
335 |
|
} |
336 |
|
|
340 |
– |
|
337 |
|
/** |
338 |
|
* invoke task throws exception when task completes abnormally |
339 |
|
*/ |
759 |
|
assertSame(NoResult, testInvokeOnPool(mainPool(), a)); |
760 |
|
} |
761 |
|
|
766 |
– |
|
762 |
|
/** |
763 |
|
* invokeAll(tasks) with any null task throws NPE |
764 |
|
*/ |