Computer Science / Unit 6 CS 0307 short lesson, about 20 seconds
The Race Condition
Captions available
The idea
A race condition is an outcome depending on the sequence or timing of uncontrollable events — the hazard that synchronization mechanisms, mutexes and semaphores among them, exist to prevent.
In practice
Two transfers reading one balance at the same instant can both approve what one should.
Where people slip
Timing bugs hide in tests that got lucky.
Your place on the trail
Every lesson rests on earlier ones and opens later ones. Tap any to jump.
Builds on
Something wrong in this lesson? Flag it · Sources for Computer Science