3 ms·
What memory fences does the Rust compiler emit without you asking?
by estebank 3y ago
What memory fences does the Rust compiler emit without you asking?
- adastra22 3y agoThe Rust compiler won’t compile code that mutates shared state unless there are appropriate memory fences. It makes you insert these barriers for correctness.
- heinrich5991 3y agoCan you give an example? I think relaxed atomics don't have memory fences.