equal
deleted
inserted
replaced
664 new ScheduledThreadPoolExecutor(poolSize); |
664 new ScheduledThreadPoolExecutor(poolSize); |
665 final CountDownLatch threadsStarted = new CountDownLatch(poolSize); |
665 final CountDownLatch threadsStarted = new CountDownLatch(poolSize); |
666 Runnable waiter = new CheckedRunnable() { public void realRun() { |
666 Runnable waiter = new CheckedRunnable() { public void realRun() { |
667 threadsStarted.countDown(); |
667 threadsStarted.countDown(); |
668 try { |
668 try { |
669 MILLISECONDS.sleep(2 * LONG_DELAY_MS); |
669 MILLISECONDS.sleep(LONGER_DELAY_MS); |
670 } catch (InterruptedException success) {} |
670 } catch (InterruptedException success) {} |
671 ran.getAndIncrement(); |
671 ran.getAndIncrement(); |
672 }}; |
672 }}; |
673 for (int i = 0; i < count; i++) |
673 for (int i = 0; i < count; i++) |
674 p.execute(waiter); |
674 p.execute(waiter); |