Java, Rust & Ruby have built-in support for concurrency, but I haven't used those languages that much.
Java, Rust & Ruby have built-in support for concurrency, but I haven't used those languages that much.
> Python 3 has async coroutines built-in
Yes, the asyncio library was introduced in Python 3.4.
> there are a number of libraries for Python 2 (e.g. twisted, tornado)
Yes, but they are not part of the language per se.
> Python 2 & 3 also have threading and multiprocessing for concurrency.
Threading and multiprocessing are really not a good fit when the number of concurrent processes increases, because each thread allocates its own stack, which can be quite expensive in terms of memory. This is the reason why Go (and maybe Erlang too but I'm not sure about the implementation) map "green" threads to OS threads, and implement a resizable stack. Libraries like gevent offer something similar for Python, with some low-level trickery.
> Java, Rust & Ruby have built-in support for concurrency
In the language and/or the standard library?
In Java, there is Quasar and Akka, for example, but they are not part of the language/standard library.
> In the language and/or the standard library?
In Rust, we have extremely strong concurrency support in the language/standard library in the form of our type system, which disallows data races at compile time. We only provide 1:1 threading, but libraries can use this type system to extend it: there's N:M threading libraries, as well as more exotic concurrency stuff than we provide directly. Rust also generally takes a "no batteries included" approach, generally speaking.In Ruby, there's Thread and Fiber. MRI's GIL hurts it here, but other implementations don't have this problem.
Same question for Ruby :-)
https://crates.io/crates/coroutine
I don't know much about the details, as I haven't used them myself, I just know they exist.