Why does PLinq not support more than 63 parallel threads?

I think the question is clear. PLinq does not allow the creation of more than 63 threads (WithDegreeOfParallelism does not allow this, throws an ArgumentOutOfRangeException). In rare cases, we need to get more than 63 threads from a thread pool (such as I / O, where a task takes longer to complete than usual). As far as I know, the Parallel class also has the same limitation. Is there a workaround? what is the reason for this limitation?

+6
source share
1 answer

Quote from this link :

With Parallel.For / ForEach, there is no implicit limit, however ThreadPool in .NET 4 (which is Parallel.For / ForEach target by default) will only use up to 64 logical processors. PLINQ in .NET 4 has a fixed limit of 63 partitions. As more and more machines become available, I expect you will see that such restrictions are removed, as with the latest versions of Windows, it supports up to 256 logical processors.

+6
source

Source: https://habr.com/ru/post/888118/


All Articles