Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 29, 2018

The GIL is no longer created "on demand" to fix a race condition when
PyGILState_Ensure() is called in a non-Python thread.

Reenable test_capi.test_bpo20891().

(cherry picked from commit 2914bb3)

https://bugs.python.org/issue20891

The GIL is no longer created "on demand" to fix a race condition when
PyGILState_Ensure() is called in a non-Python thread.

Reenable test_capi.test_bpo20891().

(cherry picked from commit 2914bb3)
@vstinner
Copy link
Member Author

@pitrou: Do you think that it's ok to make such change in the stable 3.6? IMHO it's a bugfix and so must be backported to 3.6.

@pitrou
Copy link
Member

pitrou commented Jan 29, 2018

@vstinner I don't think so. People can already call PyEval_InitThreads.

@vstinner
Copy link
Member Author

@vstinner I don't think so. People can already call PyEval_InitThreads.

Since only two users complained about https://bugs.python.org/issue20891 in 3 years, I agree that it's ok to not fix Python 2.7 and 3.6. The workaround is to call PyEval_InitThreads() before starting the first thread.

I wasn't excited to make such stable in stable 2.7 and 3.6 anyway :-)

@vstinner vstinner closed this Jan 29, 2018
@vstinner vstinner deleted the gil_created36 branch January 29, 2018 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants