May 2010
Intermediate to advanced
1272 pages
61h 18m
English
ParallelEnumerableThe System.Linq namespace for .NET 4.0 introduces a new ParallelEnumerable class, which is the parallel counterpart of Enumerable and provides extension methods specific to parallelism, such as AsParallel. You can use ParallelEnumerable members instead of invoking AsParallel because both return a ParallelQuery(Of T). For example the PLINQ query in the first example could be rewritten as follows:

In this case the range variable is of type ParallelEnumerable(Of Integer), and therefore you do not need to invoke AsParallel. By the way, there are some differences in how data is handled, and this may often lead AsParallel to ...
Read now
Unlock full access