Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit dc40ae4d authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

fix: multithreaded execution

parent a30aebf6
Branches
Tags database-v0.0.1 helm-v0.0.2
No related merge requests found
......@@ -51,6 +51,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
private static int _jobNumber;
private readonly AutoResetEvent _resetEvent = new AutoResetEvent(false);
/// <summary>
/// Initializes a new empty instance of the <see cref="JobContainer"/> class.
/// </summary>
......@@ -74,7 +77,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
public IEnumerable<CycleTypeDescription> GetCycleTypes()
{
return Runs.Select(r => new CycleTypeDescription {Name = r.Run.CycleName,CycleType = r.Run.GetContainer().RunData.Cycle.CycleType}).Distinct();
return
Runs.Select(
r => new CycleTypeDescription { Name = r.Run.CycleName, CycleType = r.Run.GetContainer().RunData.Cycle.CycleType })
.Distinct();
}
/// <summary>
......@@ -130,11 +136,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
}
private static readonly AutoResetEvent ResetEvent = new AutoResetEvent(false);
public void WaitFinished()
{
ResetEvent.WaitOne();
_resetEvent.WaitOne();
}
......@@ -147,7 +152,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
if (AllCompleted) {
_sumWriter.Finish();
ResetEvent.Set();
_resetEvent.Set();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment