3 ms·
The situation where the atomicity of integer operations matter is when there are multiple references to a single memory location, at least one of which is mutab
by Tuna-Fish 10y ago
The situation where the atomicity of integer operations matter is when there are multiple references to a single memory location, at least one of which is mutable.
The entire basis of the memory protection model of Rust is that it makes the above impossible in safe code. If you attempt to create such a situation, the compiler will fail to compile your code. Every single integer operation could stop being atomic and not a single line of safe rust would break.