fixed a few remaining executors to use only daemon threads so the VM can be shut down cleanly when needed

Change-Id: I1aaa83a01dba167df169ab0c28aa40d2c1617319
This commit is contained in:
Axel Uhl committed 2016-07-15 00:24:00 +02:00
1 parent 9a5b405ded
commit e4ba3e2832
9 files changed
+21 -9

No files matched your search

@@ -59,6 +59,7 @@ import com.sap.sse.common.TimePoint;
import com.sap.sse.common.impl.MillisecondsDurationImpl;
import com.sap.sse.common.impl.MillisecondsTimePoint;
import com.sap.sse.util.SmartFutureCache;
import com.sap.sse.util.impl.ThreadFactoryWithPriority;
public class SimulationServiceImpl implements SimulationService {
@@ -74,7 +75,7 @@ public class SimulationServiceImpl implements SimulationService {
public SimulationServiceImpl(Executor executor, RacingEventService racingEventService) {
this.executor = executor;
this.scheduler = Executors.newScheduledThreadPool(1);
this.scheduler = Executors.newScheduledThreadPool(1, new ThreadFactoryWithPriority(Thread.NORM_PRIORITY, /* daemon */ true));
this.racingEventService = racingEventService;
if (racingEventService != null) {
this.raceListeners = new HashMap<String, SimulationRaceListener>();