How to run a task in max defined parallel threads using c#.net 4.0
问题 I have 1 method that I want to run in 10 different parallel threads, all will be independent there are no dependency on each other, my problem is that if I have 100 items to process and would like to process 10 at a time then how do in run 10 at a time. I have created a sample code where I am using Parallel.ForEach but what do I need to set so it should run 10 threads at a time and suppose any of the the running task have completed then it should automatically take new one, so all 10 threads