Skip to content

PyThreadState_Delete does not require the GIL.

Bitbucket Importer requested to merge bitbucket/declined-pr-79 into branch/default

Created originally on Bitbucket by xwang (Xiaoqiang Wang)

Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.

I have a project using cffi to interface a C library. The tests on Windows 64bit often hangs on exit. I have traced the problem to be PyEval_RestoreThread at funciton cffi_thread_shutdown. It seems to fail in getting the GIL.

Since it only wants to destroy the thread state, there is another function PyThreadState_Delete which does not require GIL. After this change, my tests have been running Ok.

Merge request reports