Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's worth highlighting that the GIL will still be available even when compiled with --disable-gil.

> The --disable-gil builds of CPython will still support optionally running with the GIL enabled at runtime (see PYTHONGIL Environment Variable and Py_mod_gil Slot).



Why not do it the other way? Have an opt-in at runtime for no-gil?


Because in general, removing the GIL should be an improvement.


In general, until you do use threads, removing the GIL is a performance loss. Even if you do use threads, you have an overhead: https://peps.python.org/pep-0703/#performance


Oh, that makes sense! I forgot that there would be overhead related to the changes for no GIL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: