Chapter 3: Best Practices for Managed Threading

When building applications that leverage parallelism and concurrency, developers need to be aware of some best practices regarding integrating managed threading concepts. This chapter will assist in this capacity. We will cover important concepts such as working with static data, avoiding deadlocks, and exhausting managed resources. These are all areas that can lead to unstable applications and unexpected behavior.

In this chapter, you will learn the following concepts:

  • Handling static objects
  • Managing deadlocks and race conditions
  • Threading limits and other recommendations

By the end of this chapter, you will have the knowledge to avoid the most common managed threading pitfalls.

Technical requirements ...

Get Parallel Programming and Concurrency with C# 10 and .NET 6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.