If I have two threads running the below piece of code without a lock, what would be the value or range of values of x in the end?
x = 0;
for (int i=0; i<10;i++) x++;
If I have two threads running the below piece of code without a lock, what would be the value or range of values of x in the end?
x = 0;
for (int i=0; i<10;i++) x++;