Last post Nov 24, 2014 08:36 PM by luckyforu2006
Nov 24, 2014 02:24 PM|luckyforu2006|LINK
We have 1 millions record in list<clsEmployee> with following data.
name - Rohit
age - 26
Is is possible to group list<clsEmployee> on the basic of age and perform some process in each group parallel.
Nov 24, 2014 02:42 PM|gerrylowry|LINK
yes, order the groups by age, then use something like Parallel.ForEach
there is a learning curve.
study Joeseph Albahari's treatise "Threading in c#" on his website. Part 5 is about parallel programming, both PLINQ (parallel LINQ) and the Parallel class.
also, search "Parallel.ForEach" and you'll find much material, for example
http://msdn.microsoft.com/en-us/library/dd460720(v=vs.110).aspx "How to: Write a Simple Parallel.ForEach Loop",
the entire treatise is available as a .pdf here:
Nov 24, 2014 08:36 PM|luckyforu2006|LINK