I have a huge collection which I would like to process each of the object in a parallel fashion. Doing the same synchronously typically involves a simple "foreach".
Just wondering, what to use in my scenario i.e., either Parallel.ForEach or MyCollection.AsParallel().ForAll().
Can you shed me some light on benefits of using the one vs the other.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…