Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 349 Bytes

PH_S009.md

File metadata and controls

9 lines (5 loc) · 349 Bytes

PH_S009 - PLINQ Side-Effects

Problem

The use of Parallel LINQ with side-effects in its body is discouraged. Moreover, even the correct use of synchronization primitives is questionable as it neglects the parallelization gains.

Solution

Apply the aggregation in a LINQ operation without side-effects and use the result of the expression.