u/kinoshitajonain r/rust • Recommends
On “Avoiding Arcs and Mutexes when sharing data in a multithreaded program”
…ite you in surprising ways.
So when writing unsafe Rust, you not only need to know the Rust rules, but also how the Rust compiler optimizes things. You also need to know what optimizations are guaranteed and what are not.
You also will probably be way more likely to run into rare compiler bugs!
Watch this video to get some in the wild examples: link to this video
Also this one is way more in depth with a much more practical example that’s a bit more difficult to wrap your head around. But it does a good job explaining: link to this video…