Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Dec 4, 2017

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
Member

Choose a reason for hiding this comment

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

s/not more/no more/

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, replaced with "no longer"

@pitrou
Copy link
Member

pitrou commented Dec 4, 2017

Is there any documentation to update?

@vstinner
Copy link
Member Author

vstinner commented Dec 4, 2017

Is there any documentation to update?

Done, see my updated PR.

Copy link
Member

Choose a reason for hiding this comment

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

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
Member Author

Choose a reason for hiding this comment

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

done

@warsaw
Copy link
Member

warsaw commented Dec 15, 2017

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

@vstinner
Copy link
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 vstinner merged commit 2914bb3 into python:master Jan 29, 2018
@bedevere-bot
Copy link

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

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