3 ms·
> So to say that a language has concurrency built-in is, in general, misleading, correct? Languages with keywords like `volatile` and `synchronized` have concu
by Manishearth 11y ago
> So to say that a language has concurrency built-in is, in general, misleading, correct?
Languages with keywords like `volatile` and `synchronized` have concurrency built in to some degree. Similarly, languages where the concurrency/parallelism system cannot be implemented as a library (e.g. Go) have it built in. So, languages can have concurrency[1] built in; Rust doesn't.
You can duplicate Rust's core concurrency abstractions and safety requirements almost exactly in a library. Rust offers lower-level building blocks as part of the language which can be composed to provide safety from data races.
The only time Rust's stdlib concurrency system factors in to the language is in the behavior of `static mut` (it requires `Sync` types), which is a pretty niche feature and not strictly necessary for safety given that `static mut` is `unsafe` to access.
[1]: Also, "concurrency" is the wrong term to use here, too, but that's a nitpick within a nitpick
- kibwen 11y ago> keywords like `volatile` Obligatory link: https://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming https://software.intel.com/en-us/blogs/2007/11/30/volatile-a...
- ben0x539 11y agoThat blog post is about C's `volatile`. Java's `volatile` is for concurrency (also its `synchronized`)