SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 0 Python

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

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.
B
Brett Simmers committed
2731913dd5234ff5ab630a3b7f1c98ad79d4d9df
Parent: 546eb7a
Committed by GitHub <[email protected]> on 3/11/2024, 3:02:58 PM