Skip to content

Files

Latest commit

 

History

History
9 lines (5 loc) · 330 Bytes

PH_S022.md

File metadata and controls

9 lines (5 loc) · 330 Bytes

PH_S022 - Parallel.For with Monitor Synchronization

Problem

The application of synchronization -such as monitor locks- inside a Parallel.For(...) statement neglects the parallelization benefits.

Solution

Make use of the localFinally argument for aggregation functions and concentrate the synchronization in there.