This commit is contained in:
wuweifeng10 2019-12-27 17:35:47 +08:00
parent e517a69d70
commit 7c94f41d96

View File

@ -24,6 +24,9 @@ public class Async {
new LinkedBlockingQueue<>(),
(ThreadFactory) Thread::new);
/**
* 如果想自定义线程池请传pool不自定义的话就走默认的COMMON_POOL
*/
public static boolean beginWork(long timeout, ThreadPoolExecutor pool, WorkerWrapper... workerWrapper) throws ExecutionException, InterruptedException {
if(workerWrapper == null || workerWrapper.length == 0) {
return false;