I'm not aware of any popular scripting language that supports utilizing multiple processors without starting new processes. Is this a thing? I don't do a lot of parallel stuff with Python but multiprocessing has met my needs.
back
3 comments
> I'm not aware of any popular scripting language that supports utilizing multiple processors without starting new processes.
Really, this is more about implementations than languages; a fairly-popular Ruby implementation (JRuby) supports native threading (and has no GIL); IIRC the main Perl 6 implementation also.
Elixir is up and coming in popularity (don't know if you consider it "scripting", which is a relatively fuzzy-bounded category), and definitely supports utilizing multiple processors without starting new OS processes (it uses "processes" as that term is used in the Erlang ecosystem, which are a different thing, basically M:N green threads.)
"Jython and IronPython have no GIL and can fully exploit multiprocessor systems" - https://wiki.python.org/moin/GlobalInterpreterLock
Granted, neither implementation has the popularity of CPython.
And both are sadly stuck on Python2, last I checked :(
Admittedly it's not all that popular, but Tcl can do this with no problems at all.
(By the way, Tcl also has an integrated event loop as well as a complete implementation of coroutines, both of which Python only very recently got.)