649 |
|
final CustomExecutor p = new CustomExecutor(1); |
650 |
|
try (PoolCleaner cleaner = cleaner(p, releaser)) { |
651 |
|
for (int i = 0; i < tasks.length; i++) |
652 |
< |
tasks[i] = p.schedule(new SmallPossiblyInterruptedRunnable(), |
652 |
> |
tasks[i] = p.schedule(possiblyInterruptedRunnable(SMALL_DELAY_MS), |
653 |
|
LONG_DELAY_MS, MILLISECONDS); |
654 |
|
int max = tasks.length; |
655 |
|
if (tasks[4].cancel(true)) --max; |
680 |
|
Runnable waiter = new CheckedRunnable() { public void realRun() { |
681 |
|
threadsStarted.countDown(); |
682 |
|
try { |
683 |
< |
MILLISECONDS.sleep(2 * LONG_DELAY_MS); |
683 |
> |
MILLISECONDS.sleep(LONGER_DELAY_MS); |
684 |
|
} catch (InterruptedException success) {} |
685 |
|
ran.getAndIncrement(); |
686 |
|
}}; |