Lesson Learnt, Streaming Producer / Consumer issue using:
BlockingCollection<T>
and Parallel.ForEach(_blockingCollection.GetConsumingEnumerable
Beware default Partitioner algo, which is chunking and buffering.
The GetConsumingPartitioner
heading covers it, and also the first comment from Stephen Toub totally nails it. We implemented similar to what commenter Hernan pointed out.
Stephen Toub Blog
My absolute saviour, NoBuffering
in: