WithDegreeOfParallelism

suggest change

The degree of parallelism is the maximum number of concurrently executing tasks that will be used to process the query.

var sequence = Enumerable.Range(1, 10000);
var evenNumbers = sequence.AsParallel()
                          .WithDegreeOfParallelism(4)
                          .Where(x => x % 2 == 0);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents