Now that we've taken a look at threads, and how we can work with and create these threads using various mechanisms in the previous chapter, it's time to look at some of the basic synchronization primitives we can leverage within our multi-threads.
It's not enough to simply add multiple threads to your application in order to improve performance. You also have to take into consideration complexities such as race conditions, and ensure that your code is properly guarded against them.
In this chapter, we'll look at some of the following concepts:
- How we can synchronize our data between threads
- Race conditions--what are they and how to guard against them
- Deadlock, and how it can cripple your systems and bring them to their knees
- An overview of all of the synchronization primitives that Python has to offer
We'll also be introducing...