Glossary / Race condition

Race condition

A bug that happens when two things run at the same moment and the result depends on which finishes first.

An example

Two withdrawal requests for ₦30,000 arrive at the same instant from a wallet holding ₦40,000. Both read the balance as ₦40,000, both pass the check, and both pay out. The wallet ends up at −₦20,000.

Why it matters

Race conditions do not show up when you test by hand. They show up under real traffic, usually with money attached. Database constraints and locks stop them; “check then act” in application code does not.

We build this into client work under escrow and wallet systems.

WhatsApp