Cancel without interruption of currently running tasks
Leave potential interruption up to scheduler shutdown. Closes gh-31019
This commit is contained in:
parent
d58e48d9f5
commit
6fc5a78252
|
|
@ -577,7 +577,7 @@ public class ScheduledAnnotationBeanPostProcessor
|
|||
}
|
||||
if (tasks != null) {
|
||||
for (ScheduledTask task : tasks) {
|
||||
task.cancel();
|
||||
task.cancel(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -595,7 +595,7 @@ public class ScheduledAnnotationBeanPostProcessor
|
|||
Collection<Set<ScheduledTask>> allTasks = this.scheduledTasks.values();
|
||||
for (Set<ScheduledTask> tasks : allTasks) {
|
||||
for (ScheduledTask task : tasks) {
|
||||
task.cancel();
|
||||
task.cancel(false);
|
||||
}
|
||||
}
|
||||
this.scheduledTasks.clear();
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ public class ScheduledTaskRegistrar implements ScheduledTaskHolder, Initializing
|
|||
@Override
|
||||
public void destroy() {
|
||||
for (ScheduledTask task : this.scheduledTasks) {
|
||||
task.cancel();
|
||||
task.cancel(false);
|
||||
}
|
||||
if (this.localExecutor != null) {
|
||||
this.localExecutor.shutdownNow();
|
||||
|
|
|
|||
Loading…
Reference in New Issue