Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC#the .NET memory modelSingle-choice MCQ

On x86/x64, ordinary writes are not reordered with each other by the hardware, yet a non-volatile field write in this pattern can still misbehave. Where does the actual reordering risk come from?

// thread A _data = 42; _ready = true; // thread B if (_ready) Console.WriteLine(_data);