8000 [3.13] Docs: C API: Fix the incorrect `PyThreadState_Swap` documentat… · python/cpython@8d92823 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d92823

Browse files
[3.13] Docs: C API: Fix the incorrect PyThreadState_Swap documentation (#133900)
1 parent 06a8c06 commit 8d92823

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/c-api/init.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,9 +1190,10 @@ code, or when embedding the Python interpreter:
11901190
.. c:function:: PyThreadState* PyThreadState_Swap(PyThreadState *tstate)
11911191
11921192
Swap the current thread state with the thread state given by the argument
1193-
*tstate*, which may be ``NULL``. The global interpreter lock must be held
1194-
and is not released.
1193+
*tstate*, which may be ``NULL``.
11951194
1195+
The :term:`GIL` does not need to be held, but will be held upon returning
1196+
if *tstate* is non-``NULL``.
11961197
11971198
The following functions use thread-local storage, and are not compatible
11981199
with sub-interpreters:

0 commit comments

Comments
 (0)
0