Problem SolutionListing

Use thread-local storage in a parallel loop.

Use the versions of Parallel.For() or Parallel.Foreach(), which allow a thread-local variable to be initialized and processed with each iteration of the loop.

5-11 and 5-12

Performing loops with chain dependencies.

Use a combination of sequential and parallel loops.

5-13

Partition data into chunks.

Use the static Partition.Create() method.

5-15 and 5-16

Partition data using a custom strategy.

Derive from the Partition or OrderablePartition classes.

5-17 to 5-26

0 0

Post a comment