Google App Engine で executor フレームワークを使用しようとしています。以下は、実行しようとしているコードです。
Thread thread = ThreadManager.createBackgroundThread(new Runnable(){
public void run(){
try{
LOGGER.info( "Checking background thread");
Thread.sleep(10);
}
catch (InterruptedException ex){
throw new RuntimeException("Exception:", ex);
}
}
});
ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(10, ThreadManager.backgroundThreadFactory());
executor.scheduleAtFixedRate(thread, 0, 30, TimeUnit.MINUTES);
しかし、これはスレッドを開始しません。しかし、thread.start()を使用すると、正しく動作します。Whitelisted Classesを確認しましたが、Executor クラスが提供されています。だから私はそれを間違っているのですか?