1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import junit.framework.*; |
490 |
|
testInvokeOnPool(mainPool(), a); |
491 |
|
} |
492 |
|
|
493 |
– |
|
493 |
|
/** |
494 |
|
* helpQuiesce returns when tasks are complete. |
495 |
|
* getQueuedTaskCount returns 0 when quiescent |
499 |
|
public void realCompute() { |
500 |
|
FibAction f = new FibAction(8); |
501 |
|
assertSame(f, f.fork()); |
502 |
< |
f.helpQuiesce(); |
502 |
> |
helpQuiesce(); |
503 |
|
assertEquals(21, f.result); |
504 |
|
assertEquals(0, getQueuedTaskCount()); |
505 |
|
checkCompletedNormally(f); |
507 |
|
testInvokeOnPool(mainPool(), a); |
508 |
|
} |
509 |
|
|
511 |
– |
|
510 |
|
/** |
511 |
|
* invoke task throws exception when task completes abnormally |
512 |
|
*/ |
776 |
|
testInvokeOnPool(mainPool, a); |
777 |
|
} |
778 |
|
|
781 |
– |
|
779 |
|
/** |
780 |
|
* setRawResult(null) succeeds |
781 |
|
*/ |
922 |
|
testInvokeOnPool(mainPool(), a); |
923 |
|
} |
924 |
|
|
928 |
– |
|
925 |
|
/** |
926 |
|
* invokeAll(tasks) with any null task throws NPE |
927 |
|
*/ |