1489 |
|
*/ |
1490 |
|
public void testAwaitQuiescence1() throws Exception { |
1491 |
|
final ForkJoinPool p = new ForkJoinPool(); |
1492 |
< |
try { |
1492 |
> |
try (PoolCleaner cleaner = cleaner(p)) { |
1493 |
|
final long startTime = System.nanoTime(); |
1494 |
|
assertTrue(p.isQuiescent()); |
1495 |
|
ForkJoinTask a = new CheckedRecursiveAction() { |
1530 |
|
assertFalse(p.isShutdown()); |
1531 |
|
assertFalse(p.isTerminating()); |
1532 |
|
assertFalse(p.isTerminated()); |
1533 |
– |
} finally { |
1534 |
– |
joinPool(p); |
1533 |
|
} |
1534 |
|
} |
1535 |
|
|
1547 |
|
"java.util.concurrent.ForkJoinPool.common.parallelism"))) |
1548 |
|
return; |
1549 |
|
final ForkJoinPool p = new ForkJoinPool(); |
1550 |
< |
try { |
1550 |
> |
try (PoolCleaner cleaner = cleaner(p)) { |
1551 |
|
assertTrue(p.isQuiescent()); |
1552 |
|
final long startTime = System.nanoTime(); |
1553 |
|
ForkJoinTask a = new CheckedRecursiveAction() { |
1580 |
|
assertFalse(p.isShutdown()); |
1581 |
|
assertFalse(p.isTerminating()); |
1582 |
|
assertFalse(p.isTerminated()); |
1585 |
– |
} finally { |
1586 |
– |
joinPool(p); |
1583 |
|
} |
1584 |
|
} |
1585 |
|
|