mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 05:23:51 +00:00
fixing the fix of the previous commit which still caused and endless recursion
This commit is contained in:
1 parent
5e97ea3b0e
commit
a5083691a2
2 files changed
+10
-8
No files matched your search
+8
-6
@@ -91,12 +91,6 @@ public abstract class TrackedRaceWithWindEssentials implements TrackedRace {
|
||||
result = createWindTrack(windSource,
|
||||
delayForWindEstimationCacheInvalidation == -1 ? getMillisecondsOverWhichToAverageWind() / 2
|
||||
: delayForWindEstimationCacheInvalidation);
|
||||
LockUtil.lockForRead(getSerializationLock());
|
||||
try {
|
||||
windTracks.put(windSource, result);
|
||||
} finally {
|
||||
LockUtil.unlockAfterRead(getSerializationLock());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,6 +110,14 @@ public abstract class TrackedRaceWithWindEssentials implements TrackedRace {
|
||||
protected WindTrack createWindTrack(WindSource windSource, long delayForWindEstimationCacheInvalidation) {
|
||||
WindTrack result = windStore.getWindTrack(trackedRegatta.getRegatta().getName(), this, windSource, millisecondsOverWhichToAverageWind,
|
||||
delayForWindEstimationCacheInvalidation);
|
||||
synchronized (windTracks) {
|
||||
LockUtil.lockForRead(getSerializationLock());
|
||||
try {
|
||||
windTracks.put(windSource, result);
|
||||
} finally {
|
||||
LockUtil.unlockAfterRead(getSerializationLock());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -623,8 +623,8 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
|
||||
* wind fixes that may have been loaded from the wind store for the new track.
|
||||
*/
|
||||
@Override
|
||||
public WindTrack getOrCreateWindTrack(WindSource windSource) {
|
||||
WindTrack result = super.getOrCreateWindTrack(windSource);
|
||||
protected WindTrack createWindTrack(WindSource windSource, long delayForWindEstimationCacheInvalidation) {
|
||||
WindTrack result = super.createWindTrack(windSource, delayForWindEstimationCacheInvalidation);
|
||||
if (windSource.getType().canBeStored()) {
|
||||
// replicate all wind fixes that may have been loaded by the wind store
|
||||
result.lockForRead();
|
||||
|
||||
Reference in new issue
Block a user