It could be beneficial to run multiple threads to perform operations on different segments concurrently, so that certain tasks can be completed quicker (like some data updates using some services), and Data Parallelism could help you, and in this scenario you can benefit from a powerful processor by writing a code as follows; ParallelOptions options = new ParallelOptions() { MaxDegreeOfParallelism = System.Environment.ProcessorCount }; Parallel.ForEach(mdList.AsEnumerable(), options, async row => { result = await ProcessATask(param); }); For debugging purposes; you can replace the ParallelForEach with this following line to your checks for certain items; Parallel.ForEach(mdList.Select(“numbertocheck”).AsEnumerable(), options, async row => { result = await ProcessATask(param); });
Solution Architect | Umbraco Certified Master | Umbraco MVPx3 | Certified ScrumMaster
"Anyone can cook, but only the fearless can be great." Ratatouille