Reputation: 230028
According to the answer to this question, there is no way to effectively use LINQ for IO bound tasks. Is there a way to gain better control, or is LINQ just not suited for such tasks?
Upvotes: 2
Views: 604
Reputation: 180788
I don't agree with your conclusion. In the other question, Luke stated that:
From the MSDN documentation: "Degree of parallelism is the maximum number of concurrently executing tasks that will be used to process the query". WithDegreeOfParallelism is just a hint that PLINQ should use no more than n threads.
The fact that Plinq only decides to use two threads for your code instead of ten doesn't mean that it is unsuitable for IO bound tasks. It means (most likely) that two threads is optimal for your code, not ten.
Upvotes: 4