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

Give up the GIL during Starlark execution #28

Merged
merged 2 commits into from
Apr 18, 2022
Merged

Give up the GIL during Starlark execution #28

merged 2 commits into from
Apr 18, 2022

Conversation

jordemort
Copy link
Contributor

I had some weird ideas about the GIL that I cleared up today. This
removes an unneccesary GIL lock in one spot, and changes exec and
eval to give up the GIL while they're busy executing Starlark code.
A mutex is added per Starlark thread to prevent multiple Python threads
from trying to access the same Starlark thread at once.

Also removed a couple unneccesary Cgo wrappers where I could use the
Python API directly instead.

I had some weird ideas about the GIL that I cleared up today. This
removes an unneccesary GIL lock in one spot, and changes `exec` and
`eval` to give up the GIL while they're busy executing Starlark code.
A mutex is added per Starlark thread to prevent multiple Python threads
from trying to access the same Starlark thread at once.

Also removed a couple unneccesary Cgo wrappers where I could use the
Python API directly instead.
@jordemort jordemort merged commit d9bc27c into main Apr 18, 2022
@jordemort jordemort deleted the give-up-gil branch April 18, 2022 22:08
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