Hacker News new | past | comments | ask | show | jobs | submit login

It is correct. Rust prevents all data races at compile time, unless you write incorrect unsafe code. This is why people try to write as little unsafe as possible. This has nothing to do with Mutexes; mutexes are provided by the standard library and the language knows nothing specific about them.



I understand. It is actually kind of easy to comprehend by remembering the borrow checker will only allow one single mutable reference at a time.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: