G
Guest
Hello.
How come it's safe to read non-volatile fields that are shared across
threads using locks for synchronization (for example, Monitor.Enter or
EventWaitHandle), but it's not safe to access them if no lock synchronization
mechanisms are employed?
Whe using locks, I'm I guaranteed that when accessing shared non-volatile
fields I will get the most up-to-date values?
Thanks.
How come it's safe to read non-volatile fields that are shared across
threads using locks for synchronization (for example, Monitor.Enter or
EventWaitHandle), but it's not safe to access them if no lock synchronization
mechanisms are employed?
Whe using locks, I'm I guaranteed that when accessing shared non-volatile
fields I will get the most up-to-date values?
Thanks.