test/jdk/java/util/concurrent/tck/ThreadPoolExecutorTest.java
changeset 58138 1e4270f875ee
parent 54684 c277ec29ee12
equal deleted inserted replaced
58137:6a556bcd94fc 58138:1e4270f875ee
   697                                    new ArrayBlockingQueue<Runnable>(10));
   697                                    new ArrayBlockingQueue<Runnable>(10));
   698         final CountDownLatch threadsStarted = new CountDownLatch(poolSize);
   698         final CountDownLatch threadsStarted = new CountDownLatch(poolSize);
   699         Runnable waiter = new CheckedRunnable() { public void realRun() {
   699         Runnable waiter = new CheckedRunnable() { public void realRun() {
   700             threadsStarted.countDown();
   700             threadsStarted.countDown();
   701             try {
   701             try {
   702                 MILLISECONDS.sleep(2 * LONG_DELAY_MS);
   702                 MILLISECONDS.sleep(LONGER_DELAY_MS);
   703             } catch (InterruptedException success) {}
   703             } catch (InterruptedException success) {}
   704             ran.getAndIncrement();
   704             ran.getAndIncrement();
   705         }};
   705         }};
   706         for (int i = 0; i < count; i++)
   706         for (int i = 0; i < count; i++)
   707             p.execute(waiter);
   707             p.execute(waiter);