| Can you please define Race Condition?
A Race Condition usually occurs in a situation when two of threads trying to access same resources and trying to change it at the same time. In that case thread which accesses the resource first cannot be predicted.
To understand this we will take a example when we have two threads A1 and A2 and they are trying to access the one of the same shared resource called X. And both of threads trying to write value to X, then the last value change to X will be saved. | | |