4 ms·
> even as recently as 2012 the most common advice was "avoid threads and use processes." Ok, I know in the grand scheme of things this may seem recent, but tha
by lewispollard 3y ago
> even as recently as 2012 the most common advice was "avoid threads and use processes."
Ok, I know in the grand scheme of things this may seem recent, but that was 12 years ago. Has the story really not changed since then?
- galbar 3y agoNot really, multi-threaded parallelism is still limited by the GIL and it is best to use multiple processes instead. Unless you are using threads for I/O, or anything not using the CPU. What has changed since then is that Python now supports single-threaded concurrency, through async-await semantics.
- jerf 3y agoAdding threading to a dynamic scripting language that had a multi-decade run as a single-threaded runtime turns out to be really, really difficult, especially if the language had C extensions. They all have had one form or another of very hard time about it, because it is a legitimately difficult problem.