4 ms·
> And Rust doesn't help in this regard. From: https://doc.rust-lang.org/nomicon/races.html https://doc.rust-lang.org/nomicon/races.html Data races are mostly
by nsuser2 10y ago
> And Rust doesn't help in this regard.
From: https://doc.rust-lang.org/nomicon/races.html https://doc.rust-lang.org/nomicon/races.html
Data races are mostly prevented through rust's ownership system: it's impossible to alias a mutable reference, so it's impossible to perform a data race. Interior mutability makes this more complicated, which is largely why we have the Send and Sync traits (see https://doc.rust-lang.org/nomicon/races.html https://doc.rust-lang.org/nomicon/races.html).