Hello,
Today i will talk about Rust and about race conditions detection and
deadlock detection..
I think Rust uses static detection , but the shortcoming of static
detection is that there is there are also many false reports.
Other than that:
Safe Rust guarantees an absence of data races, which are defined as:
- two or more threads concurrently accessing a location of memory
- one of them is a write
- one of them is unsynchronized
A data race has Undefined Behavior, and is therefore impossible to
perform in Safe Rust. 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
below).
However Rust does not prevent general race conditions.
Read more here:
https://doc.rust-lang.org/nomicon/races.html
Also with Rust there is no deadlock detection.
Thank you,
Amine Moulay Ramdane.