End Sub. 7. Build and run the application.
7. Build and run the application. 8. You should observe that like the LINQ query based on the ParallelEnumerable static class, the PLINQ query implemented as extension methods no longer performs operations in order by EmployeeID. Instead the operations are executed in parallel with as many operations occurring concurrently as the number of physical cores will allow. Also note that as in the previous parallelize LINQ example, the parallelized version completes in roughly half the time as the non-parallelized version. Figure 16 Output from parallelized LINQ query with extension methods
Task 3 – Using AsParallel() With Query Comprehension Syntax In this task you will use the Parallel Extensions library and the AsParallel() method to create parallelized LINQ queries using the query comprehension syntax. 1. Replace the LINQ query in the Main() method with the following query comprehension syntax: C# static void Main(string[] args) {
// Methods to call
|