测试线程池

master
陈思豪 2024-09-10 09:14:12 +08:00
parent 070b52c7a3
commit 38ea062c18
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ public class PriorityThreadPool {
// 创建固定大小的线程池 // 创建固定大小的线程池
executor = new ThreadPoolExecutor( executor = new ThreadPoolExecutor(
totalThreads, totalThreads, totalThreads, totalThreads,
60L, TimeUnit.SECONDS, 30L, TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>() new LinkedBlockingQueue<Runnable>()
); );
highPrioritySemaphore = new Semaphore(defaultHighThreads); highPrioritySemaphore = new Semaphore(defaultHighThreads);