The One with the Thread Tangles
Concurrency and threading
Threading and concurrency are things that most developers think they know all about. The theory sounds so simple, yet in practice, threading is where a lot of mistakes are made and where all those frustrating bugs originate. Threading can be quite complex, but the people of the BCL and CLR teams have done their best to help us as much as they can to make things simpler.
Once you get the hang of it, threading is a great addition to your skills and can make a major difference in your systems.
We will look at the following topics in this chapter:
- What is concurrency and threading?
- How do threads work internally in .NET and Windows?
- How does the CLR help us?
- What is async/await?
- How do we synchronize threads and make them work together?
- How can I make sure my code behaves nicely when working with threads?
- How can I use collections over threads?
Let’s look into this fascinating...