Is there any advantage of using volatile keyword in contrast to use the Interlocked class?
问题 In other words, can I do something with a volatile variable that could not also be solved with a normal variable and the Interlocked class? 回答1: EDIT: question largely rewritten To answer this question, I dived a bit further in the matter and found out a few things about volatile and Interlocked that I wasn't aware of. Let's clear that out, not only for me, but for this discussion and other people reading up on this: volatile read/write are supposed to be immune to reordering. This only means