ThreadPoolExecutor を作成しようとしています:
// Thingy implements Delayed and Runnable
ExecutorService executor = new ThreadPoolExecutor(1, 1, 0l, TimeUnit.SECONDS, new DelayQueue<Thingy>());
コンパイラは「シンボルが見つかりません」と言っています:
symbol : constructor ThreadPoolExecutor(int,int,long,java.util.concurrent.TimeUnit,java.util.concurrent.DelayQueue<Thingy>)
しかし、私は理解していません—DelayQueue
実装するので、このコンストラクターBlockingQueue
を使用できるべきではありませんか?