I have a report building class that uses parallel processing to create a batch of 800 reports.
Until yesterday, it worked fine with the following code:
Parallel.ForEach(reports, report => { this.Build(report); });
Note: for debugging purposes, I exclude code from a test written in a test project.
Yesterday a crash started. Digging a little with Resource Monitor showed that the number of threads associated with qtagent32.exe (test runner) was constantly increasing and ultimately led to a process failure. It seems that something suddenly began to block.
I managed to fix the problem with a small change to my code:
Parallel.ForEach(reports, new ParallelOptions { MaxDegreeOfParallelism = 4 }, report => { this.Build(report); });
But I still wonder what has changed?
source share