Item | Price |
---|---|
Total |
This webpage demonstrates the concept of a race condition. Open this same web page on two different browsers. Type the same buyer on both browsers. Hit "Load/Refresh," then hit "Apply Coupon" on both browsers within 10 seconds of each other. You will find the coupon gets applied twice.
If you try after 10 seconds, you will find you will be unable to apply the coupon. Basically, there is a "bug" in the code where performing actions quickly leads to a different outcome from performing them slowly.
Queries on this example run slowly to allow for the race condition so be patient with the wait.