mirror of
https://gitee.com/jd-platform-opensource/asyncTool.git
synced 2024-12-31 15:35:34 +08:00
修改不定长线程池
This commit is contained in:
parent
4ea14f355b
commit
bc4affb2b5
@ -18,11 +18,7 @@ public class Async {
|
|||||||
/**
|
/**
|
||||||
* 默认线程池
|
* 默认线程池
|
||||||
*/
|
*/
|
||||||
private static final ThreadPoolExecutor COMMON_POOL =
|
private static final ThreadPoolExecutor COMMON_POOL = (ThreadPoolExecutor) Executors.newCachedThreadPool();;
|
||||||
new ThreadPoolExecutor(Runtime.getRuntime().availableProcessors() * 2, 1024,
|
|
||||||
15L, TimeUnit.SECONDS,
|
|
||||||
new LinkedBlockingQueue<>(),
|
|
||||||
(ThreadFactory) Thread::new);
|
|
||||||
|
|
||||||
private static ExecutorService executorService;
|
private static ExecutorService executorService;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user