Skip to content

Commit a8fa4ad

Browse files
authored
Doc: Fix suggested usage of -X gil=0 in the glossary (#125366)
Currently, the "global interpreter lock" entry in the glossary mentions that `-X gil 0` can be used to disable the GIL [1]. However, this is invalid; the correct usage should be `-X gil=0`. $ python -X gil 0 -c 'print("Hello, world")' Fatal Python error: config_read_gil: PYTHON_GIL / -X gil must be "0" or "1" Python runtime state: preinitialized $ python -X gil=0 -c 'print("Hello, world")' Hello, world [1]: https://docs.python.org/3/using/cmdline.html#cmdoption-X Signed-off-by: Ruoyu Zhong <[email protected]>
1 parent 330c527 commit a8fa4ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ Glossary
617617

618618
As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil`
619619
build configuration. After building Python with this option, code must be
620-
run with :option:`-X gil 0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 <PYTHON_GIL>`
620+
run with :option:`-X gil=0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 <PYTHON_GIL>`
621621
environment variable. This feature enables improved performance for
622622
multi-threaded applications and makes it easier to use multi-core CPUs
623623
efficiently. For more details, see :pep:`703`.

0 commit comments

Comments
 (0)