Hacker News new | ask | show | jobs
by pcwalton 4081 days ago
Actually, atomics and locks (which are fully supported) are what avoid that issue in Rust. You can't borrow across multiple threads.
1 comments

You can now with scoped threads, provided that you don't require mutation.
Actually, it's possible to share a &mut into a scoped threat too, and perform mutation through it. It's safe because the &mut only ever exists in one place at a time.