Inside the ComputerConcurrent Computing
The Race Condition
Correct steps can go wrong when they happen at the same moment
Two phones, one account, both tapped at the same moment. Every step the bank takes is right. So how does it pay twice?
You'll find out
- How two correct requests go wrong
- The simple lock that fixes it
- Why tests rarely catch it
Why it matters
Banks, ticket sites and power grids all juggle requests at once, and a race between them can cost real money.
Play this lesson
Free to play in your browser or on iPhone