测试线程池

master
陈思豪 2024-09-10 16:28:37 +08:00
parent da54e9e99f
commit 4bfcadc8ea
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,
40L, TimeUnit.SECONDS, 60L, TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>() new LinkedBlockingQueue<Runnable>()
); );
highPrioritySemaphore = new Semaphore(defaultHighThreads); highPrioritySemaphore = new Semaphore(defaultHighThreads);