May 2021
Intermediate to advanced
142 pages
3h 37m
English
Running your code concurrently sounds appealing—who doesn’t want to run more code? Unfortunately, running code concurrently can create problems that you didn’t realize even existed. Before diving into concurrency, we’ll start this chapter with a brief forewarning.
One class of problems caused by concurrency are called race conditions. In a classic race condition example, two concurrent banking operations accidentally allow a customer to overdraw his bank account: