Exercise 4: Parallelize LINQ Queries using PLINQDevelopers can optimize their LINQ queries to execute in a parallel environment by utilizing Parallelized LINQ (PLINQ). The Parallel Extensions library offers many different ways to implement parallelism in LINQ queries. PLINQ provides you with the System.Linq.ParallelEnumerable class which offers functionality similar to the System.Linq.Enumerable class. Task 1 – Using the ParallelEnumerable Class’ Static Methods to Parallelize LINQIn this task, you will continue to use the same solution as the previous exercises.
Task 2 – Using the ParallelEnumerable Class’ Extension Methods to Parallelize LINQAs mentioned earlier, a more succinct way to take advantage of the Enumerable and ParallelEnumerable classes’ static LINQ methods is to use them as Extension methods.
Task 3 – Using AsParallel() With Query Comprehension SyntaxIn this task you will use the Parallel Extensions library and the AsParallel() method to create parallelized LINQ queries using the query comprehension syntax.
Next Step: |
DownloadsDownload The Offline Training Kit Contents |