FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.6] bpo-20891: Py_Initialize() now creates the GIL (#4700) by vstinner · Pull Request #5421 · python/cpython · GitHub

/ cpython Public

[3.6] bpo-20891: Py_Initialize() now creates the GIL (#4700) - #5421

Closed
vstinner wants to merge 1 commit into
python:3.6from
vstinner:gil_created36
Closed

[3.6] bpo-20891: Py_Initialize() now creates the GIL (#4700)#5421
vstinner wants to merge 1 commit into
python:3.6from
vstinner:gil_created36

Conversation

vstinner commented Jan 29, 2018
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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)

Copy link
Copy Markdown
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 commented Jan 29, 2018

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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 closed this Jan 29, 2018
vstinner deleted the gil_created36 branch January 29, 2018 13:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL