How to configure a maximum number of threads in a Parallel.For

后端 未结 3 789
执念已碎
执念已碎 2021-01-01 12:00

This is the example microsoft presents for the parallel for, and I\'d like to know how configure a maximum number of threads for this code.

     // A basic m         


        
3条回答
  •  春和景丽
    2021-01-01 12:33

    I'd suggest you take a look at the ParallelOption.MaxDegreesofParellelism and pass it into the For method

提交回复
热议问题