News for hackers. Stuff that matters.
Re:Measuring mutexes, spinlocks and how bad the Linux schedu... by tsimionescu on Wednesday January 01, 2020 @05:28AM (#21927489)
Not really, in Rust's case. It's the general borrow checker which handles this.

Since in Rust it is illegal for a value to be referenced for writing in one place and referenced for anything else in any other place, regardless of concurrency/parallelism, Rust code is data-race free by design.

I still think that GP's comment was a non-sequitur.

Re:Measuring mutexes, spinlocks and how bad the Linux schedu... by zozbot234 on Wednesday January 01, 2020 @06:36AM (#21927650)
Rust has "interior" mutability, meaning that shared references are not true 'read only' references; they can be used for writing if the type supports such an operation. What makes Rust data-race free is the combination of 'interior' mutability and the Send and Sync traits, which control moving or referencing objects across threads.