Skip to content

Commit

Permalink
Docs: Add central references to free-threading-related options (#119017)
Browse files Browse the repository at this point in the history
  • Loading branch information
swtaarrs committed May 21, 2024
1 parent 6e9863d commit 9fa206a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ The available slot types are:
This slot is ignored by Python builds not configured with
:option:`--disable-gil`. Otherwise, it determines whether or not importing
this module will cause the GIL to be automatically enabled. See
:envvar:`PYTHON_GIL` and :option:`-X gil <-X>` for more detail.
:ref:`free-threaded-cpython` for more detail.
Multiple ``Py_mod_gil`` slots may not be specified in one module definition.
If ``Py_mod_gil`` is not specified, the import machinery defaults to
``Py_MOD_GIL_USED``.
.. versionadded: 3.13
.. versionadded:: 3.13
See :PEP:`489` for more details on multi-phase initialization.
Expand Down
5 changes: 3 additions & 2 deletions Doc/using/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@ Miscellaneous options

* :samp:`-X gil={0,1}` forces the GIL to be disabled or enabled,
respectively. Only available in builds configured with
:option:`--disable-gil`. See also :envvar:`PYTHON_GIL`.
:option:`--disable-gil`. See also :envvar:`PYTHON_GIL` and
:ref:`free-threaded-cpython`.

.. versionadded:: 3.13

Expand Down Expand Up @@ -1212,7 +1213,7 @@ conflict.
forced on. Setting it to ``0`` forces the GIL off.

See also the :option:`-X gil <-X>` command-line option, which takes
precedence over this variable.
precedence over this variable, and :ref:`free-threaded-cpython`.

Needs Python configured with the :option:`--disable-gil` build option.

Expand Down
2 changes: 1 addition & 1 deletion Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ General Options
Defines the ``Py_GIL_DISABLED`` macro and adds ``"t"`` to
:data:`sys.abiflags`.

See :pep:`703` "Making the Global Interpreter Lock Optional in CPython".
See :ref:`free-threaded-cpython` for more detail.

.. versionadded:: 3.13

Expand Down
3 changes: 2 additions & 1 deletion Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ CPython will run with the :term:`global interpreter lock` (GIL) disabled when
configured using the ``--disable-gil`` option at build time. This is an
experimental feature and therefore isn't used by default. Users need to
either compile their own interpreter, or install one of the experimental
builds that are marked as *free-threaded*.
builds that are marked as *free-threaded*. See :pep:`703` "Making the Global
Interpreter Lock Optional in CPython" for more detail.

Free-threaded execution allows for full utilization of the available
processing power by running threads in parallel on available CPU cores.
Expand Down

0 comments on commit 9fa206a

Please sign in to comment.