mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
Apparently the default `Parallel.ForEach` logic checks whether the input enumerable is an array or `IList<T>`, and if it is, creates whole chunks of sequential list/array indices and assigns those to the worker threads. This is more efficient if the individual items are processed very quickly; but if they take varying amounts of time, a single chunk full of expensive items might keep a single CPU core busy for long after all other CPU cores have gone idle.pull/2087/head
4 changed files with 39 additions and 24 deletions
Loading…
Reference in new issue