File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1282,8 +1282,14 @@ with sub-interpreters:
12821282
12831283.. c:function:: int PyGILState_EnsureOrFail(PyGILState_STATE *state)
12841284
1285- Similar to :c:func:`PyGILState_Ensure`, but *state* is an argument
1286- and return ``-1`` if the thread must exit. Return ``0`` on success.
1285+ Similar to :c:func:`PyGILState_Ensure`, except that it returns with a status
1286+ code even in the case of failure. Specifically, it returns ``0`` when the
1287+ operation succeeded, and ``-1`` otherwise. In contrast to
1288+ :c:func:`PyGILState_Ensure`, *state* is an argument.
1289+
1290+ In the case of failure, it is *unsafe* to use the Python API following the
1291+ call. Releasing the obtained *state* via :c:func:`PyGILState_Release` should
1292+ only be done in the case of success.
12871293
12881294 .. versionadded:: next
12891295
You can’t perform that action at this time.
0 commit comments