mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 05:23:51 +00:00
Improved concurrency for RaceLogMappingWrapper
This commit is contained in:
1 parent
c356f73552
commit
70573cf746
1 file changed
+4
-1
+4
-1
@@ -51,7 +51,10 @@ public abstract class RaceLogMappingWrapper<ItemT extends WithID> {
|
||||
|
||||
public void forEachMappingOfDeviceIncludingTimePoint(DeviceIdentifier device, TimePoint timePoint,
|
||||
Consumer<DeviceMappingWithRegattaLogEvent<ItemT>> callback) {
|
||||
List<DeviceMappingWithRegattaLogEvent<ItemT>> mappingsForDevice = getMappingsByDevice().get(device);
|
||||
List<DeviceMappingWithRegattaLogEvent<ItemT>> mappingsForDevice;
|
||||
synchronized (this) {
|
||||
mappingsForDevice = mappingsByDevice.get(device);
|
||||
}
|
||||
if (mappingsForDevice != null) {
|
||||
for (DeviceMappingWithRegattaLogEvent<ItemT> mapping : mappingsForDevice) {
|
||||
if (mapping.getTimeRange().includes(timePoint)) {
|
||||
|
||||
Reference in new issue
Block a user