Amaury Forgeot d'Arc added the comment:

> The _PyGILState_Fini function might cause user code to run as well, 
> it removes the thread-local variable that contains the PyThreadState 
> for threads, and that contains some Python objects that might contain 
> arbitrary values (such as the last exception value). 

No, _PyGILState_Fini does not invoke any python code; it only clears C
variables. The last exception value is deleted during the call to 
PyInterpreterState_Clear() (inside PyThreadState_Clear).

Python-bugs-list mailing list 

Reply via email to