Would you please clarify something to me?
1. So to say that a language has concurrency built-in is, in general, misleading, correct?
2. Than a language may have concurrency primitives, but the capability comes from C through the OS?
Would you please clarify something to me?
1. So to say that a language has concurrency built-in is, in general, misleading, correct?
2. Than a language may have concurrency primitives, but the capability comes from C through the OS?
In general, very little of Rust is technically "in the language", but to the user, something in the standard library vs the language itself often doesn't matter, it's the same experience either way.
BTW, I remember in the alpha days when the decision was made to make Rust support concurrency in the standard library rather in the language itself. So in that sense (Rust = language spec + stdlib) Rust does have concurrency built-in.
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
> keywords like `volatile`
Obligatory link: https://software.intel.com/en-us/blogs/2007/11/30/volatile-a...