equal
deleted
inserted
replaced
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) { |