46 |
|
} |
47 |
|
|
48 |
|
private void testInvokeOnPool(ForkJoinPool pool, RecursiveAction a) { |
49 |
< |
try { |
49 |
> |
try (PoolCleaner cleaner = cleaner(pool)) { |
50 |
|
checkNotDone(a); |
51 |
|
|
52 |
|
assertNull(pool.invoke(a)); |
53 |
|
|
54 |
|
checkCompletedNormally(a); |
55 |
– |
} finally { |
56 |
– |
joinPool(pool); |
55 |
|
} |
56 |
|
} |
57 |
|
|
423 |
|
|
424 |
|
t = newStartedThread(r); |
425 |
|
testInvokeOnPool(mainPool(), a); |
426 |
< |
awaitTermination(t, LONG_DELAY_MS); |
426 |
> |
awaitTermination(t); |
427 |
|
|
428 |
|
a.reinitialize(); |
429 |
|
t = newStartedThread(r); |
430 |
|
testInvokeOnPool(singletonPool(), a); |
431 |
< |
awaitTermination(t, LONG_DELAY_MS); |
431 |
> |
awaitTermination(t); |
432 |
|
} |
433 |
|
|
434 |
|
/** |