jdk/test/java/util/concurrent/ThreadPoolExecutor/ScheduledTickleService.java
changeset 7518 0282db800fe1
parent 5506 202f599c92aa
child 7668 d4a77089c587
equal deleted inserted replaced
7517:7303bc0e78d6 7518:0282db800fe1
    35 
    35 
    36 public class ScheduledTickleService {
    36 public class ScheduledTickleService {
    37 
    37 
    38     // We get intermittent ClassCastException if greater than 1
    38     // We get intermittent ClassCastException if greater than 1
    39     // because of calls to compareTo
    39     // because of calls to compareTo
    40     private final static int concurrency = 2;
    40     private static final int concurrency = 2;
    41 
    41 
    42     // Record when tasks are done
    42     // Record when tasks are done
    43     public final static CountDownLatch done = new CountDownLatch(concurrency);
    43     public static final CountDownLatch done = new CountDownLatch(concurrency);
    44 
    44 
    45     public static void realMain(String... args) throws InterruptedException {
    45     public static void realMain(String... args) throws InterruptedException {
    46         // our tickle service
    46         // our tickle service
    47         ScheduledExecutorService tickleService =
    47         ScheduledExecutorService tickleService =
    48             new ScheduledThreadPoolExecutor(concurrency) {
    48             new ScheduledThreadPoolExecutor(concurrency) {