319 |
|
assertEquals(21, (int) testInvokeOnPool(mainPool(), a)); |
320 |
|
} |
321 |
|
|
322 |
– |
|
322 |
|
/** |
323 |
|
* helpQuiesce returns when tasks are complete. |
324 |
|
* getQueuedTaskCount returns 0 when quiescent |
328 |
|
public Integer realCompute() { |
329 |
|
FibTask f = new FibTask(8); |
330 |
|
assertSame(f, f.fork()); |
331 |
< |
f.helpQuiesce(); |
331 |
> |
helpQuiesce(); |
332 |
|
assertEquals(0, getQueuedTaskCount()); |
333 |
|
checkCompletedNormally(f, 21); |
334 |
|
return NoResult; |
336 |
|
assertSame(NoResult, testInvokeOnPool(mainPool(), a)); |
337 |
|
} |
338 |
|
|
340 |
– |
|
339 |
|
/** |
340 |
|
* invoke task throws exception when task completes abnormally |
341 |
|
*/ |
761 |
|
assertSame(NoResult, testInvokeOnPool(mainPool(), a)); |
762 |
|
} |
763 |
|
|
766 |
– |
|
764 |
|
/** |
765 |
|
* invokeAll(tasks) with any null task throws NPE |
766 |
|
*/ |