reference assignment is atomic so why is Interlocked.Exchange(ref Object, Object) needed?
There are numerous questions here. Considering them one at a time: reference assignment is atomic so why is Interlocked.Exchange(ref Object, Object) needed? Reference assignment is atomic. Interlocked.Exchange does not do only reference assignment. It does a read of the current value of a variable, stashes away the old value, and assigns the new value to … Read more