return new DedicatedTaskRunner(task, name, priority, daemon);
}
}
protected ExecutorService createDefaultExecutor() {
ThreadPoolExecutor rc = new ThreadPoolExecutor(1, Integer.MAX_VALUE, 10, TimeUnit.SECONDS, new SynchronousQueue(), new ThreadFactory() {
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable, name);
thread.setDaemon(daemon);
thread.setPriority(priority);
return thread;
}
});
rc.allowCoreThreadTimeOut(true);
return rc;
}