Commit b7799941 authored by yanzg's avatar yanzg

升级新版本

parent 95d52d47
......@@ -85,6 +85,10 @@ public class YzgTimeout {
}
private static void init() {
if (executorService != null) {
return;
}
synchronized (YzgTimeout.class) {
if (executorService != null) {
return;
......@@ -95,8 +99,12 @@ public class YzgTimeout {
ThreadHelper.runThread(() -> {
while (true) {
runItem();
ThreadHelper.sleep(1000);
try {
runItem();
} catch (Exception ex) {
ex.printStackTrace();
}
ThreadHelper.sleep(200);
}
});
}
......@@ -112,6 +120,9 @@ public class YzgTimeout {
synchronized (queueInfos) {
poll = queueInfos.poll();
}
if (poll == null) {
return;
}
long end = System.currentTimeMillis();
long time = end - poll.getStart();
if (time > poll.getTimeMax()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment