Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get GIL status on Python 3.7+ #104

Merged
merged 1 commit into from
Mar 24, 2019
Merged

Get GIL status on Python 3.7+ #104

merged 1 commit into from
Mar 24, 2019

Conversation

benfred
Copy link
Owner

@benfred benfred commented Mar 24, 2019

Get the GIL status by looking at pyruntime.gilstate.tstate_current on
python v3.7+. This can't be gotten in a cross platform why by using
bindgen, so provide a lookup function to return the offsets instead.
This also removes the previous attempt to generate bindings for the
pyruntime struct.

Also adds support for finding the offsets in generate_bindings.py, and
a basic integration test to make sure that we can detect gil usage
appropiately using all this.

Get the GIL status by looking at pyruntime.gilstate.tstate_current on
python v3.7+. This can't be gotten in a cross platform why by using
bindgen, so provide a lookup function to return the offsets instead.
This also removes the previous attempt to generate bindings for the
pyruntime struct.

Also adds support for finding the offsets in generate_bindings.py, and
a basic integration test to make sure that we can detect gil usage
appropiately using all this.
@benfred benfred merged commit c8a77e8 into master Mar 24, 2019
@benfred benfred deleted the gil_python37 branch March 24, 2019 20:11
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.

1 participant