The C # specification says that reading and writing are atomic for 32-bit types and less (and also for references). Therefore, if I have an Int32 field in my class, I know that several threads can read and write to it, and they will be atomic in operation, and therefore the value will always be consistent (although caching problems are a potential problem, but this is not a problem of this question).
Is it the same on 64-bit systems? If I compile my application for 64-bit, does that mean that Int64 is still considered non-atomic? Or now I can consider Int64 atomic in read / write, because it is compiled and works on a 64-bit system?
source share