4 ms·
The main thing that Python users complain about in CPython is the global interpreter lock, which restricts all the threads in a Python process to one CPU. (Ruby
by etal 18y ago
The main thing that Python users complain about in CPython is the global interpreter lock, which restricts all the threads in a Python process to one CPU. (Ruby has this too.) So concurrency over multiple CPUs has steadily become more of a concern over the years.
Stackless came up with a solution, but Guido shot it down, and it appears be surviving somewhat in parallel. (No pun intended.) Jython gets rid of the GIL and uses native threads like Java, and is scheduled to come out of its half-decade coma sometime this year. The mainline CPython implementors insist that getting rid of the GIL would cause infinite headache, but they're offering a reasonable substitute in Python 2.6: the multiprocessing module, which has a thread-like API but uses separate OS processes behind the scenes. So, I don't think there will be a mutiny over this.
- BrandonM 18y agoI watch the python-ideas mailing list and there has been some talk recently of bringing some of the micro-threading ideas from Twisted into the CPython implementation itself. I don't have much knowledge of micro-threads or Twisted so I haven't been following the conversation very closely, but at least that's another data point in the state of parallelism in Python.