Hi,
Say there's a statement waiting for a variable to be updated by another thread.
#in thread1:
while (flag == 0);
Without using any kind of lock, there might be a read-write conflict if one thread reads the variable while it's being updated by another one.
#in thread2:
flag = 1;
Can this lead to an infinite loop? or is the conflict only going to delay the thread #1 ?
Thanks in advance,