任务线程轮空30次后自动销毁,降低低频任务的无效线程消耗。

master
xuxueli 8 years ago
parent 3138d48afa
commit bc92b4f2ae
  1. 2
      xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java

@ -143,7 +143,7 @@ public class JobThread extends Thread{
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), stopResult));
}
} else {
if (idleTimes > 3) {
if (idleTimes > 30) {
XxlJobExecutor.removeJobThread(jobId, "excutor idel times over limit.");
}
}

Loading…
Cancel
Save