Quantcast
Channel: What is a race condition? - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Answer by zacksiri for What is a race condition?

$
0
0

I made a video that explains this.

Essentially it is when you have a state with is shared across multiple threads and before the first execution on a given state is completed, another execution starts and the new thread’s initial state for a given operation is wrong because the previous execution has not completed.

Because the initial state of the second execution is wrong, the resulting computation is also wrong. Because eventually the second execution will update the final state with the wrong result.

reading a shared state

final computation is incorrect

You can view it here.https://youtu.be/RWRicNoWKOY


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>