March 2010
Intermediate to advanced
984 pages
21h 13m
English
IN THE PRECEDING CHAPTER, we discussed the details of multithreaded programming using the Task Parallel Library (TPL) and Parallel LINQ (PLINQ). One topic specifically avoided, however, was thread synchronization that prevents race conditions while avoiding deadlocks. Thread synchronization is the topic of this chapter.

We begin with a multithreaded example with no thread synchronization around shared data—resulting in a race condition in which data integrity is lost. This serves as the introduction for why we need thread synchronization followed by myriad mechanisms and best practices for ...
Read now
Unlock full access