- #1
SlurrerOfSpeech
- 141
- 11
I recently learned about C#.NET's Parallel.ForEach function and it made me think that this is the new hammer I have that will make everything look like a nail. Under the covers, the parallel foreach figures out how to use the optimal number of threads (based on your machines CPUs and cores) to accomplish the tasks in the loop in the least amount of time possible. Of course, it only makes sense to use this if
Am I making any incorrect assumptions?
- the tasks are independent
- there is no specific order in which the tasks need to be completed
Am I making any incorrect assumptions?