// only the download servlet has a thread pool
if (threadMaximumPoolSize > 0) {
// lets use a synchronous queue so it waits for the other threads to be available before handing over
// we are waiting for the task to be done anyway in doGet so there is no point in having a worker queue
executorService = new ThreadPoolExecutor(1, threadMaximumPoolSize, 60, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(), new ThreadFactory("MavenDownloadProxyServlet"));
// lets allow core threads to timeout also, so if there is no download for a while then no threads is wasted
executorService.allowCoreThreadTimeOut(true);
}
super.start();