Concurrency · Real-world situation · Experienced
Race condition in a wallet service
A wallet service checks the balance in code and then debits it. Under concurrent requests, users can spend more than their balance. How do you fix it across multiple instances?
2:00