提交 cd950443 编写于 作者: A alanb

7165762: (aio) Default thread pool should be configured so that threads...

7165762: (aio) Default thread pool should be configured so that threads terminated after a timeout period
Reviewed-by: chegar
上级 0dac3c62
......@@ -102,11 +102,7 @@ public class ThreadPool {
if (threadFactory == null)
threadFactory = defaultThreadFactory;
// create thread pool
ExecutorService executor =
new ThreadPoolExecutor(0, Integer.MAX_VALUE,
Long.MAX_VALUE, TimeUnit.MILLISECONDS,
new SynchronousQueue<Runnable>(),
threadFactory);
ExecutorService executor = Executors.newCachedThreadPool(threadFactory);
return new ThreadPool(executor, false, initialSize);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册