[Python-Dev] Const access to CPython objects outside of GIL?

Ronald Oussoren ronaldoussoren at mac.com
Wed Jul 18 02:37:59 EDT 2018

Op 17 jul. 2018 om 09:40 heeft Radim Řehůřek <radim at rare-technologies.com> het volgende geschreven:

> To be honest, I did do some CPython source code staring already. And at least for the functions we care about, it wasn't all that painful (PyDict_GetItem being the trickiest). Doing this wholesale might be a superhuman task, but I'm thinking a practical subset could be relatively straightforward while still useful, 80/20.

This is would likely lead to a fairly vague document.  Using PyDict_GetItem as an example, even if it might sometimes be possible to call without holding the GIL there are definitely use cases where it is not, for example when there are keys with a type implemented in python, or when the dict is modified in another thread. 


More information about the Python-Dev mailing list