4 ms·
> This latter point is particularly interesting; the Rust compiler will not compile a program that has a potential race condition in it. I feel obliged to poin
by Munksgaard 10y ago
> This latter point is particularly interesting; the Rust compiler will not compile a program that has a potential race condition in it.
I feel obliged to point out that this is false. Rust prevents _data races_, but not _race conditions_. You can read more in the Rustonomicon here: https://doc.rust-lang.org/nomicon/races.html https://doc.rust-lang.org/nomicon/races.html
- Jonhoo 10y agoIn my defense, the next sentence is "Unless you explicitly mark your code as `unsafe`, your code simply cannot have data races." That said, I've updated the article text to now say data races in both places.