1550 |
|
protected void realCompute() { |
1551 |
|
FibAction f = new FibAction(8); |
1552 |
|
assertSame(f, f.fork()); |
1553 |
– |
ForkJoinTask.helpQuiesce(); |
1553 |
|
while (!f.isDone()) { |
1554 |
|
assertFalse(p.getAsyncMode()); |
1555 |
|
assertFalse(p.isShutdown()); |
1562 |
|
assertEquals(21, f.result); |
1563 |
|
}}; |
1564 |
|
p.execute(a); |
1565 |
< |
if (a.isDone() || p.isQuiescent()) |
1567 |
< |
continue; // Already done so cannot test; retry |
1568 |
< |
while (!p.awaitQuiescence(LONG_DELAY_MS, MILLISECONDS)) { |
1569 |
< |
assertFalse(p.getAsyncMode()); |
1570 |
< |
assertFalse(p.isShutdown()); |
1571 |
< |
assertFalse(p.isTerminating()); |
1572 |
< |
assertFalse(p.isTerminated()); |
1573 |
< |
Thread.yield(); |
1574 |
< |
} |
1565 |
> |
assertTrue(p.awaitQuiescence(LONG_DELAY_MS, MILLISECONDS)); |
1566 |
|
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
1567 |
|
assertTrue(p.isQuiescent()); |
1568 |
|
assertTrue(a.isDone()); |