Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
guitarrapc authored Sep 17, 2024
1 parent 52650e6 commit c26ecc0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions perf/BenchmarkApp/PerformanceTest.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,15 @@ async Task<PerformanceResult> RunScenarioAsync(ScenarioType scenario, ScenarioCo
WriteLog("Cleaning up...");
foreach (var s in scenarios.Chunk(ApplicationInformation.Current.ProcessorCount))
{
await Task.WhenAll(s.Select(x => x.CompleteAsync()));
try
{
await Task.WhenAll(s.Select(x => x.CompleteAsync()));
}
catch (NullReferenceException)
{
// ignore
}
}

WriteLog("Cleanup completed");

var result = ctx.GetResult();
Expand Down

0 comments on commit c26ecc0

Please sign in to comment.