Paul Ganssle <p.gans...@gmail.com> added the comment:

> It does not seem to me that two threads have the GIL at the same time.

To be clear, this was never my contention. I was under the impression that if 
you take the GIL with PyGILState_Ensure(), the GIL was held until you called 
PyGILState_Release(), as with a traditional lock, so I was puzzled as to why 
Thread 2 was *releasing* the GIL even though I had very much not released it.

>From our discussion off the issue tracker, it seems that your contention is 
>that any C API calls can arbitrarily release the GIL, and the calling function 
>can not be said to "hold" the GIL. If this is true than this is not a bug and 
>can be closed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34416>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to