1 karma · joined Sep 25, 2021 (5y ago) · 1 submissions
comment 5y ago · link · parent
0. Deadlock: https://play.rust-lang.org/?version=stable&mode=debug&editio...
1. Race condition: https://play.rust-lang.org/?version=stable&mode=debug&editio...
Perhaps you were thinking about data races, which are unsafe and therefore not allowed by Safe Rust? The Rustonomicon (https://doc.rust-lang.org/nomicon/races.html) defines data races as:
- two or more threads concurrently accessing a location of memory
- one or more of them is a write
- one or more of them is unsynchronized
Possibly you knew all of this and just got carried away in your enthusiasm for Rust (very much shared!), but lest your readers think Rust is actual magic instead of merely amazing, it might be nice to clarify the article.