Skip to content

Commit

Permalink
Use concurrentbag instead of list
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Werkman committed Apr 3, 2024
1 parent 0c6f1a3 commit cd8c764
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -64,7 +65,7 @@ public IEnumerable<IMutationTestProcess> MutateProjects(StrykerOptions options,
InitializeDashboardProjectInformation(options, projectInfos.First());
var inputs = _initializationProcess.GetMutationTestInputs(options, projectInfos, _runner);

var mutationTestProcesses = new List<IMutationTestProcess>();
var mutationTestProcesses = new ConcurrentBag<IMutationTestProcess>();
Parallel.ForEach(inputs, mutationTestInput =>
{
mutationTestProcesses.Add(_projectMutator.MutateProject(options, mutationTestInput, reporters));
Expand Down

0 comments on commit cd8c764

Please sign in to comment.