🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Race Condition

In plain terms

A bug where the outcome depends on the unpredictable timing of concurrent operations.

Going deeper

When two threads or processes touch shared data at overlapping times, the final result can change run to run depending on who got there first. These bugs are notoriously hard to reproduce and are prevented with locks, atomic operations, or careful design.

Under the hood

Arises from unsynchronized access to shared state; hard to reproduce because timing-dependent, and detected with race detectors or fixed via locks, atomics, or immutability.

Examples

Two threads incrementing a counter; check-then-act on a file; double-spending bugs.

Think of it like...

Like two people editing the same shared document line at once: whose change 'wins' depends on the exact split-second they hit save, and sometimes one quietly clobbers the other.

Feedback & Bug Report