-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-116167: Allow disabling the GIL with PYTHON_GIL=0
or -X gil=0
#116338
Merged
+163
−1
Commits on Mar 5, 2024
-
Allow disabling the GIL with
PYTHON_GIL=0
In free-threaded builds, running with `PYTHON_GIL=0` will now disable the GIL. Follow-up issues track work to re-enable the GIL when loading an incompatible extension, and to disable the GIL by default. In order to support re-enabling the GIL at runtime, all GIL-related data structures are initialized as usual, and disabling the GIL simply sets a flag that causes `take_gil()` and `drop_gil()` to return early. With `PYTHON_GIL=0` set, I spot-checked a few tests and small programs that don't use threads. They all seem to run fine, and very basic threaded programs work, sometimes. Trying to run the full test suite crashes pretty quickly, in `test_asyncio`.
Configuration menu - View commit details
-
Copy full SHA for 9e03999 - Browse repository at this point
Copy the full SHA 9e03999View commit details -
Configuration menu - View commit details
-
Copy full SHA for a53ed2e - Browse repository at this point
Copy the full SHA a53ed2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0b8484 - Browse repository at this point
Copy the full SHA e0b8484View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f43a87 - Browse repository at this point
Copy the full SHA 4f43a87View commit details
Commits on Mar 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9e9d925 - Browse repository at this point
Copy the full SHA 9e9d925View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5053661 - Browse repository at this point
Copy the full SHA 5053661View commit details
Commits on Mar 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6d62fbb - Browse repository at this point
Copy the full SHA 6d62fbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 971a9a1 - Browse repository at this point
Copy the full SHA 971a9a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89b1150 - Browse repository at this point
Copy the full SHA 89b1150View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16fbd44 - Browse repository at this point
Copy the full SHA 16fbd44View commit details
Commits on Mar 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8d39bbc - Browse repository at this point
Copy the full SHA 8d39bbcView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.