Last active
November 19, 2019 07:00
-
-
Save nbhusare/58dac744fd9c873675e7f0c0dcbb8d7d to your computer and use it in GitHub Desktop.
Data Race Vs Race condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data race: It occurs when synchronization is not used to coordinate access to the shared state. You risk data race whenever you write to a shared variable that might next be read by another thread, or read a variable that might have last been written by another thread, if both threads do not use synchronization | |
Race condition: It occurs when the correctness of a computation depends on the relative timing of interlaving of multiple threads by the runtime; in other words, when getting the right answer relies on the lucky timing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment