package org.to2mbn.jmccc.mcdownloader.util;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public final class ThreadPoolUtils {

	public static ThreadPoolExecutor createPool(int threads, long keepAliveTime, TimeUnit unit) {
		return new ThreadPoolExecutor(0, threads, keepAliveTime, unit, new LinkedBlockingQueue<Runnable>());
	}

	private ThreadPoolUtils() {}
}

@@ -313,14 +313,33 @@
 %7B%0A%09%09
-return
+ThreadPoolExecutor pool =
  new
@@ -362,9 +362,15 @@
 tor(
-0
+threads
 , th
@@ -435,16 +435,68 @@
 le%3E());%0A
+%09%09pool.allowCoreThreadTimeOut(true);%0A%09%09return pool;%0A
 %09%7D%0A%0A%09pri

fix thread pool