Skip Navigation

GIL Become Optional in Python 3.13

geekpython.in GIL Become Optional in Python 3.13

GIL or Global Interpreter Lock can be disabled in Python version 3.13. This is currently experimental.

GIL Become Optional in Python 3.13

cross-posted from: https://lemmy.ndlug.org/post/970135

GIL or Global Interpreter Lock can be disabled in Python version 3.13. This is currently experimental.

Python 3.13 brings major new features compared to Python 3.12 and one of them is free-threaded mode, which disables the Global Interpreter Lock, allowing threads to run more concurrently.

The GIL will be disabled when you configure the Python with the --disable-gil option which is nothing but a build configuration (free threading build) at the time of installation.

This will allow optionally enabling and disabling GIL using the environment variable PYTHON_GIL which can be set to 1 and 0 respectively.

It will also provide a command-line option -X gil which can also be set to 0 (disable) and 1 (enable).

6

You're viewing a single thread.

6 comments
6 comments