ThreadPoolExecutor pool= null;
pool = new ThreadPoolExecutor(
80,
120,
60,
TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>(1000),
new ThreadFactoryBuilder().setNameFormat("test-%d").build(),
new ThreadPoolExecutor.CallerRunsPolicy());
.allowCoreThreadTimeOut(true);
网友评论