rc = new ThreadPoolExecutor(corePoolSize, maxPoolSize, 10,
TimeUnit.SECONDS, new SynchronousQueue(),
new DefaultThreadFactory(name, daemon, priority));
} else {
rc = new ThreadPoolExecutor(corePoolSize, maxPoolSize, 10,
TimeUnit.SECONDS, new LinkedBlockingQueue(),
new DefaultThreadFactory(name, daemon, priority));
}
// FIXME: This API is only in JDK 1.6 - Use reflection?
// rc.allowCoreThreadTimeOut(true);
return rc;