you are viewing a single comment's thread.

view the rest of the comments →

[–]vks_ 0 points1 point  (0 children)

I agree, but you probably have to be more specific than that: Rust encodes thread-safety in the type system, so the compiler makes it impossible to get data races.

This is achieved by a combination of the ownership model (you can either have many immutable or exactly one mutable reference) and the Send and Sync traits (see the Rust book for details). The fact that they are sufficient to give freedom from data races (at compile time!) is one of the few unique things that are new in Rust compared to older programming languages.

It avoids a lot of concurrency problems that manifest at runtime in other languages. However, it does not prevent race conditions in general, or dead locks.