Added try/finally to ensure that unlock is correctly called if an

exception is thrown by TrackedRace.setStatusAndProgress
This commit is contained in:
Steffen Schaefer committed 2016-09-28 16:00:04 +02:00
1 parent 72463bc793
commit 0ab64a06e3
1 file changed
+3
@@ -308,6 +308,7 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
updateCallback.run();
}
} finally {
try {
synchronized (FixLoaderAndTracker.this) {
int currentActiveLoaders = activeLoaders.decrementAndGet();
FixLoaderAndTracker.this.notifyAll();
@@ -316,9 +317,11 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
: TrackedRaceStatusEnum.TRACKING, 1.0);
}
}
} finally {
trackedRace.unlockAfterSerializationRead();
}
}
}
});
}