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

gh-116167: Allow disabling the GIL with PYTHON_GIL=0 or -X gil=0 #116338

Merged
merged 11 commits into from
Mar 11, 2024

Commits on Mar 5, 2024

  1. 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`.
    swtaarrs committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    9e03999 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a53ed2e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e0b8484 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f43a87 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Fix else brace formatting

    swtaarrs committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9e9d925 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5053661 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Configuration menu
    Copy the full SHA
    6d62fbb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    971a9a1 View commit details
    Browse the repository at this point in the history
  3. Fix link to -X gil

    swtaarrs committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    89b1150 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    16fbd44 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    8d39bbc View commit details
    Browse the repository at this point in the history