O'Reilly logo

C# Multithreaded and Parallel Programming by Rodney Ringler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Data Parallelism

Concurrently performing a task or a set of operations on a collection of data is referred to as data parallelism. For example, if we have a list of files in a folder and we want to rename them all, we can create a For loop that goes through the collection and, during each iteration, the loop performs a rename command. We can also iterate through a collection datatype such as a List or DataView using a foreach statement. These are specialized For and ForEach statements that are part of the Task Parallel Library (TPL) in the System.Threading.Tasks.Parallel namespace.

The TPL provides the Parallel library to make it easy to perform concurrent operations on a dataset or data collection using the different overloads of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required