L***s 发帖数: 1148 | 1
As far as I know, refcnt is a major reason, but not the whole story.
Python (as well as Ruby) VM bytecodes are simply way too high level
for any finer-grain locks to be useful.
PyPy, another Python implementation that trace-JITs the interpreter
itself instead of the Python program, does not support refcnt semantics
--it uses multiple gc algorithms, with minimark being the default one--
but it still has GIL present, for many reasons.
You may take a look at their STM proposal to get some ideas
ht... 阅读全帖 |
|