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

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

/ cpython Public

bpo-20891: Py_Initialize() now creates the GIL - #4700

Merged
vstinner merged 4 commits into
python:masterfrom
vstinner:gil_created
Jan 29, 2018
Merged

bpo-20891: Py_Initialize() now creates the GIL#4700
vstinner merged 4 commits into
python:masterfrom
vstinner:gil_created

Conversation

vstinner commented Dec 4, 2017
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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

https://bugs.python.org/issue20891

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

s/not more/no more/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

oops, replaced with "no longer"

pitrou commented Dec 4, 2017

Copy link
Copy Markdown
Member

Is there any documentation to update?

vstinner commented Dec 4, 2017

Copy link
Copy Markdown
Member Author

Is there any documentation to update?

Done, see my updated PR.

Comment thread Doc/c-api/init.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I would phrase it more explicitly:

This function is now called by :c:func:`Py_Initialize()`, so you don't have to call it yourself anymore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

done

warsaw commented Dec 15, 2017

Copy link
Copy Markdown
Member

This branch seems to fix the issue for me on macOS 10.12.6

Copy link
Copy Markdown
Member Author

For benchmark results, see https://bugs.python.org/issue20891#msg308588

The GIL is no longer created "on demand" to fix a race condition when
PyGILState_Ensure() is called in a non-Python thread.
Remove also mention of the "thread support", since thread support
cannot be disabled anymore.
Make the assumption that the GIL is always created (by
Py_Initialize()).
vstinner merged commit 2914bb3 into python:master Jan 29, 2018

Copy link
Copy Markdown

@vstinner: Please replace # with GH- in the commit message next time. Thanks!

vstinner deleted the gil_created branch January 29, 2018 10:57
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL