From 94e3a209bb9a31c4ddbd31494bb1628f6fe2e96e Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期三, 12 十月 2022 17:54:49 +0800
Subject: [PATCH] 新增首页工单 办事指南排行榜接口 导办人员排行榜接口 组织排行榜接口 新增办事指南统计接口 导办人员统计接口 组织胖行榜统计接口
---
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Threads.java | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Threads.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Threads.java
index 2d99185..2e87dfe 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Threads.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Threads.java
@@ -1,9 +1,8 @@
package com.panzhihua.common.utlis;
+import java.util.concurrent.*;
import lombok.extern.slf4j.Slf4j;
-
-import java.util.concurrent.*;
/**
* 线程相关工具类.
@@ -24,10 +23,7 @@
}
/**
- * 停止线程池
- * 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务.
- * 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数.
- * 如果仍人超時,則強制退出.
+ * 停止线程池 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务. 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数. 如果仍人超時,則強制退出.
* 另对在shutdown时线程本身被调用中断做了处理.
*/
public static void shutdownAndAwaitTermination(ExecutorService pool) {
@@ -37,7 +33,7 @@
if (!pool.awaitTermination(120, TimeUnit.SECONDS)) {
pool.shutdownNow();
if (!pool.awaitTermination(120, TimeUnit.SECONDS)) {
-// log.info("Pool did not terminate");
+ // log.info("Pool did not terminate");
}
}
@@ -54,7 +50,7 @@
public static void printException(Runnable r, Throwable t) {
if (t == null && r instanceof Future<?>) {
try {
- Future<?> future = (Future<?>) r;
+ Future<?> future = (Future<?>)r;
if (future.isDone()) {
future.get();
}
@@ -67,7 +63,7 @@
}
}
if (t != null) {
-// log.error(t.getMessage(), t);
+ // log.error(t.getMessage(), t);
}
}
}
--
Gitblit v1.7.1