Skip to content

Commit a1e47b7

Browse files
committed
Simplify PyEval_SaveThread and PyEval_RestoreThread
1 parent 0130b20 commit a1e47b7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Doc/c-api/init.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,17 +1210,14 @@ code, or when embedding the Python interpreter:
12101210
12111211
.. c:function:: PyThreadState* PyEval_SaveThread()
12121212
1213-
Release the global interpreter lock (if it has been created) and reset the
1214-
thread state to ``NULL``, returning the previous thread state (which is not
1215-
``NULL``). If the lock has been created, the current thread must have
1216-
acquired it.
1213+
Detach the active :term:`thread state` (if it has been created) and
1214+
return it.
12171215
12181216
12191217
.. c:function:: void PyEval_RestoreThread(PyThreadState *tstate)
12201218
1221-
Acquire the global interpreter lock (if it has been created) and set the
1222-
thread state to *tstate*, which must not be ``NULL``. If the lock has been
1223-
created, the current thread must not have acquired it, otherwise deadlock
1219+
Set the current :term:`thread state` to *tstate*, which must not be ``NULL``.
1220+
The passed :term:`thread state` **should not** be attached, otherwise deadlock
12241221
ensues.
12251222
12261223
.. note::

0 commit comments

Comments
 (0)