8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyThreadState_Swap
1 parent 06a8c06 commit 8d92823Copy full SHA for 8d92823
Doc/c-api/init.rst
@@ -1190,9 +1190,10 @@ code, or when embedding the Python interpreter:
1190
.. c:function:: PyThreadState* PyThreadState_Swap(PyThreadState *tstate)
1191
1192
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.
+ *tstate*, which may be ``NULL``.
1195
+ The :term:`GIL` does not need to be held, but will be held upon returning
1196
+ if *tstate* is non-``NULL``.
1197
1198
The following functions use thread-local storage, and are not compatible
1199
with sub-interpreters:
0 commit comments