3 ms·
What do you mean by language constructs? As in, a `synchronized` keyword? Or are you thinking along the lines of `async` `await`? If you mean the `synchroniz
by cogman10 6y ago
What do you mean by language constructs? As in, a `synchronized` keyword? Or are you thinking along the lines of `async` `await`?
If you mean the `synchronized` keyword, then correct, they don't have that. Most languages do not have that concept. C++ does have mutexes and has had them since C++11 (nearly a decade). C++ also has as part of the language spec the concept of threads, again, there since C++11.
If you meant co-routines, then C++ just added them with C++20.
Or do you mean something different like green threads (ala go)?
C++ certainly has concurrency constructs and has been expanding them since C++11.
- fetbaffe 6y agoLike Gos goroutines or Erlangs processes. And more of message passing. C++ has added many of these things later on in the standard library, bolted on afterwards.
- erichocean 6y agoIf you think that using libraries to do things in C++ means they are "bolted on", then you don't understand C++. The entire design of C++ is to enable efficient libraries for these kinds of things to be built. And it does, and has, and will continue to for decades more.