修改:定时调度执行异常和 任务堆叠导致丢失任务bug

This commit is contained in:
lxy
2021-01-25 12:50:53 +08:00
parent f4ed1b05d0
commit 0cd83f1a19
3 changed files with 69 additions and 17 deletions

View File

@@ -28,6 +28,15 @@ public class AppTest {
consumer.timer("a", () -> {
System.out.println(Utility.now() + " timer a 执行了");
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
});
consumer.timer("b", () -> {
System.out.println(Utility.now() + " ----------------- timer b 执行了");
});