Thread synchronization of non-atomic invariants in .NET 4.5
Now that we’ve seen how a singular x86-x64 focus might affect how we can synchronize atomic invariants, let’s look at non-atomic invariants. While an atomic invariant really doesn’t need much in the way of guarding, non-atomic invariants often do. The rules by which the invariant is correct are often much more complex. Ensuring an atomic invariant like int, for example is pretty easy: you can’t set it to an invalid value, you just need to make sure the value is visible. Non-atomic invariants involve data that can’t natively be modified atomically. The typical case is more than one variable, but … Continue reading Thread synchronization of non-atomic invariants in .NET 4.5