抽取公共方法,重构代码逻辑
This commit is contained in:
@@ -32,7 +32,7 @@ public class ExecutorThreadPool {
|
||||
pool.execute(command);
|
||||
}
|
||||
|
||||
public static void awaitThreadTask(){
|
||||
public void awaitThreadTask(){
|
||||
try {
|
||||
while (!pool.awaitTermination(ApplicationConfig.THREAD_AWAIT_TERMINATION_TIME, TimeUnit.SECONDS)) {
|
||||
LOG.warn("线程池没有关闭");
|
||||
@@ -42,7 +42,7 @@ public class ExecutorThreadPool {
|
||||
}
|
||||
}
|
||||
|
||||
public static void shutdown(){
|
||||
public void shutdown(){
|
||||
pool.shutdown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user