1488 |
|
/** |
1489 |
|
* awaitQuiescent by a worker is equivalent in effect to |
1490 |
|
* ForkJoinTask.helpQuiesce() |
1491 |
< |
*/ |
1491 |
> |
*/ |
1492 |
|
public void testAwaitQuiescent1() throws Exception { |
1493 |
|
final ForkJoinPool p = new ForkJoinPool(); |
1494 |
|
try { |
1513 |
|
assertEquals(0, ForkJoinTask.getQueuedTaskCount()); |
1514 |
|
try { |
1515 |
|
assertEquals(21, f.result); |
1516 |
< |
} catch (Throwable fail) { |
1517 |
< |
threadFail(fail.getMessage()); |
1516 |
> |
} catch (Throwable fail) { |
1517 |
> |
threadFail(fail.getMessage()); |
1518 |
|
} |
1519 |
|
} |
1520 |
|
}; |
1541 |
|
joinPool(p); |
1542 |
|
} |
1543 |
|
} |
1544 |
< |
|
1544 |
> |
|
1545 |
|
/** |
1546 |
|
* awaitQuiescent returns when pool isQuiescent() or the indicated |
1547 |
|
* timeout elapse |
1548 |
< |
*/ |
1548 |
> |
*/ |
1549 |
|
public void testAwaitQuiescent2() throws Exception { |
1550 |
|
final ForkJoinPool p = new ForkJoinPool(); |
1551 |
|
try { |
1597 |
|
} |
1598 |
|
} |
1599 |
|
|
1600 |
– |
|
1600 |
|
} |