---
title: "Comment by OneLifeVibe on \"What Is a Race Condition? When Two Programs Step on Each Other's Toes\" | Hashnode"
description: "The shared bank account example is what made this click for me. Two ATMs both reading 100 dollars, both writing back 90, and ten dollars appearing from nowhere"
url: "https://hashnode.com/posts/what-is-a-race-condition-when-two-programs-step-on-each-other-s-toes/6af66a02b6a5245dad28cb8c/comment/6af6bb7c5bc1768a1dbab6fa"
---

[Discussion](https://hashnode.com/posts/what-is-a-race-condition-when-two-programs-step-on-each-other-s-toes/6af66a02b6a5245dad28cb8c)

Comment [What Is a Race Condition? When Two Programs Step on Each Other's Toes](https://hashnode.com/posts/what-is-a-race-condition-when-two-programs-step-on-each-other-s-toes/6af66a02b6a5245dad28cb8c)

[OneLifeVibe](https://hashnode.com/@onelifevibe)

[4d ago](https://hashnode.com/posts/what-is-a-race-condition-when-two-programs-step-on-each-other-s-toes/6af66a02b6a5245dad28cb8c/comment/6af6bb7c5bc1768a1dbab6fa)

The shared bank account example is what made this click for me. Two ATMs both reading 100 dollars, both writing back 90, and ten dollars appearing from nowhere shows the bug better than any definition. I also liked the point that balance equals balance plus one looks like one step but is really three, and that the result can be 2000 one run and 1947 the next. The warning about locks creating their own trouble with deadlock is a useful balance to the fix.
