[Minor] stop future when stopping ExecutorService

This commit is contained in:
Robert von Burg 2017-08-23 10:59:47 +02:00
parent 13d8ae3595
commit 0aca2e517c
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ public class SimpleDurationExecutionTimer implements DelayedExecutionTimer {
@Override
public void destroy() {
this.simulationTasks.values().forEach(task -> task.cancel(false));
if (this.scheduledExecutorService != null) {
this.scheduledExecutorService.shutdown();
while (!this.scheduledExecutorService.isTerminated()) {