mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-24 04:53:54 +00:00
create the wind simulator thread as a daemon thread to not keep VM from shutting down if requested
This commit is contained in:
1 parent
d6ab714e25
commit
9147d7cca8
1 file changed
+5
-2
+5
-2
@@ -88,7 +88,8 @@ public class Simulator {
|
|||||||
for (final Map.Entry<? extends WindSource, ? extends WindTrack> windSourceAndTrack : windStore.loadWindTracks(
|
for (final Map.Entry<? extends WindSource, ? extends WindTrack> windSourceAndTrack : windStore.loadWindTracks(
|
||||||
trackedRace.getTrackedRegatta().getRegatta().getName(), trackedRace,
|
trackedRace.getTrackedRegatta().getRegatta().getName(), trackedRace,
|
||||||
/* millisecondsOverWhichToAverageWind doesn't matter because we only use raw fixes */ 10000).entrySet()) {
|
/* millisecondsOverWhichToAverageWind doesn't matter because we only use raw fixes */ 10000).entrySet()) {
|
||||||
new Thread("Wind simulator for wind source "+windSourceAndTrack.getKey()+" for tracked race "+trackedRace.getRace().getName()) {
|
Thread windSimulatorThread =
|
||||||
|
new Thread("Wind simulator for wind source "+windSourceAndTrack.getKey()+" for tracked race "+trackedRace.getRace().getName()) {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final WindTrack windTrack = windSourceAndTrack.getValue();
|
final WindTrack windTrack = windSourceAndTrack.getValue();
|
||||||
@@ -105,7 +106,9 @@ public class Simulator {
|
|||||||
}
|
}
|
||||||
logger.info("Wind Track Simulator for race "+trackedRace.getRace().getName()+" finished. stopped="+stopped);
|
logger.info("Wind Track Simulator for race "+trackedRace.getRace().getName()+" finished. stopped="+stopped);
|
||||||
}
|
}
|
||||||
}.start();
|
};
|
||||||
|
windSimulatorThread.setDaemon(true);
|
||||||
|
windSimulatorThread.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user