Hacker News new | ask | show | jobs
by shortstuffsushi 4085 days ago
Wouldn't the concept of borrowing avoid that issue in Rust though?
1 comments

Actually, atomics and locks (which are fully supported) are what avoid that issue in Rust. You can't borrow across multiple threads.
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.