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-123672: Clarify the usage of PyGILState* for subinterpreters #123728

Closed
wants to merge 23 commits into from
Closed
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,10 @@ from a C thread is::
Note that the ``PyGILState_*`` functions assume there is only one global
interpreter (created automatically by :c:func:`Py_Initialize`). Python
supports the creation of additional interpreters (using
:c:func:`Py_NewInterpreter`), but mixing multiple interpreters and the
``PyGILState_*`` API is unsupported.
:c:func:`Py_NewInterpreter`), but switching between interpreters via the
``PyGILState_*`` API is unsupported. On the other hand, *creating*
sub-interpreters (whether they have a per-interpreter GIL or not, in
the sense of :pep:`684`) still require to hold the GIL.
ZeroIntensity marked this conversation as resolved.
Show resolved Hide resolved


.. _fork-and-threads:
Expand Down
Loading