Chapter 19: Summary

At the beginning of this chapter, we glossed over some of the difficult problems that developers often face when writing multithreaded programs: atomicity problems, deadlocks, and other race conditions that introduce uncertainty and bad behavior into multithreaded programs. We then delved into the Task Parallel Library (TPL) and its Task-based Asynchronous Pattern (TAP), a new API for creating and scheduling units of work represented by Task objects, and we saw how they simplify multithreaded programming by enabling you to automatically rewrite your programs to manage the continuation “wiring” that composes larger tasks out of smaller tasks. In Chapters 20 and 21, we introduce additional high-level abstractions that cover additional scenarios and simplify TAP even further.

In Chapter 22, we switch over to cover how to avoid atomicity problems with synchronized access to shared resources without introducing deadlocks.

{{ snackbarMessage }}