Merge pull request #30 from mlemanczyk/codex/fix-exception-in-resultsparser
Fix worker index capture causing split results failure
This commit is contained in:
1 file changed
+4
-3
@@ -639,7 +639,8 @@ internal static class Program
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks[worker] = Task.Run(() =>
|
int workerIndex = worker;
|
||||||
|
tasks[workerIndex] = Task.Run(() =>
|
||||||
{
|
{
|
||||||
List<CandidateResult> localPassed = new(length);
|
List<CandidateResult> localPassed = new(length);
|
||||||
List<CandidateResult> localRejected = new(length);
|
List<CandidateResult> localRejected = new(length);
|
||||||
@@ -656,8 +657,8 @@ internal static class Program
|
|||||||
localRejected.Add(candidate);
|
localRejected.Add(candidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
passedSegments[worker] = localPassed;
|
passedSegments[workerIndex] = localPassed;
|
||||||
rejectedSegments[worker] = localRejected;
|
rejectedSegments[workerIndex] = localRejected;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user