Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 0005ee6d authored by Harald MARTINI's avatar Harald MARTINI
Browse files

added lock to Results in DeclarationReport

parent c59d2caf
No related branches found
No related tags found
No related merge requests found
......@@ -164,8 +164,10 @@ namespace TUGraz.VectoCore.OutputData
//runData.VehicleData.VehicleClass,
PassengerCount = runData.VehicleData.PassengerCount
};
Results.Add(entry);
lock (Results) {
Results.Add(entry);
}
DoStoreResult(entry, runData, modData);
}
......@@ -174,9 +176,12 @@ namespace TUGraz.VectoCore.OutputData
protected virtual IEnumerable<T> OrderedResults
{
get {
return Results.OrderBy(x => x.VehicleClass).ThenBy(x => x.FuelMode).ThenBy(x => x.Mission)
.ThenBy(x => x.LoadingType);
get
{
lock (Results) {
return Results.OrderBy(x => x.VehicleClass).ThenBy(x => x.FuelMode).ThenBy(x => x.Mission)
.ThenBy(x => x.LoadingType);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment