3 ms·
"PEP 703 – Making the Global Interpreter Lock Optional in CPython" (2023) https://peps.python.org/pep-0703/ https://peps.python.org/pep-0703/ CPython built wit
by westurner 2y ago
"PEP 703 – Making the Global Interpreter Lock Optional in CPython" (2023) https://peps.python.org/pep-0703/ https://peps.python.org/pep-0703/
CPython built with --disable-gil does not have a GIL (as long as PYTHONGIL=0 and all loaded C extensions are built for --disable-gil mode)
https://peps.python.org/pep-0703/#py-mod-gil-slot https://peps.python.org/pep-0703/#py-mod-gil-slot
"Intent to approve PEP 703: making the GIL optional" (2023) https://news.ycombinator.com/item?id=36913328#36917709 https://news.ycombinator.com/item?id=36913328#36917709 https://news.ycombinator.com/item?id=36913328#36921625 https://news.ycombinator.com/item?id=36913328#36921625
- kaashif 2y agoThis is pretty beside the point. The point is that X not having a GIL doesn't inherently mean Python on X also doesn't have a GIL.
- westurner 2y agoCPython does not have a GIL Global Interpreter Lock GC Garbage Collection phase with --gil-disabled. GraalVM does have a GIL, like CPython without --gil-disabled. How CPython accomplished nogil in their - the original and reference - fork is described in the topical linked PEP 703.
- kaashif 2y agoYes, I know. What I'm saying is that: It's possible to have a language that doesn't have a GIL, which you implement Python in, but that Python implementation then has a GIL. The point being that you can't say things like: Jython is written in Java so it doesn't have a GIL. CPython is written in C so doesn't have a GIL. And so on. If this isn't clear, I apologize.
- westurner 2y agoOh okay. Yeah I would say that the Java GC and the ported CPython GIL are probably limits to the performance of any Python in Java implementation. But are there even nogil builds of CPython C extensions on PyPi yet anyway. Re: Ghidraal and various methods of Python in Java: https://news.ycombinator.com/item?id=36454485 https://news.ycombinator.com/item?id=36454485