How can I check if a thread holds the GIL with sub-interpreters?
How can I check if a thread holds the GIL with sub-interpreters? Question: I am working on some changes to a library which embeds Python which require me to utilize sub-interpreters in order to support resetting the python state, while avoiding calling Py_Finalize (since calling Py_Initialize afterwards is a no-no). I am only somewhat familiar …