Fix worker index capture in results splitting
This commit is contained in:
1 parent
22be048c15
commit
83d405c8d5
1 file changed
+4
-3
@@ -639,7 +639,8 @@ internal static class Program
|
||||
continue;
|
||||
}
|
||||
|
||||
tasks[worker] = Task.Run(() =>
|
||||
int workerIndex = worker;
|
||||
tasks[workerIndex] = Task.Run(() =>
|
||||
{
|
||||
List<CandidateResult> localPassed = new(length);
|
||||
List<CandidateResult> localRejected = new(length);
|
||||
@@ -656,8 +657,8 @@ internal static class Program
|
||||
localRejected.Add(candidate);
|
||||
}
|
||||
|
||||
passedSegments[worker] = localPassed;
|
||||
rejectedSegments[worker] = localRejected;
|
||||
passedSegments[workerIndex] = localPassed;
|
||||
rejectedSegments[workerIndex] = localRejected;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user