Skip to content

Commit 820be0b

Browse files
ZeroIntensityvstinner
authored andcommitted
gh-141004: Document Py_MakePendingCalls (GH-141137)
(cherry picked from commit ce70103) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent fd1e3fe commit 820be0b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Doc/c-api/init.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,25 @@ pointer and a void pointer argument.
19641964
This function now always schedules *func* to be run in the main
19651965
interpreter.
19661966
1967+
1968+
.. c:function:: int Py_MakePendingCalls(void)
1969+
1970+
Execute all pending calls. This is usually executed automatically by the
1971+
interpreter.
1972+
1973+
This function returns ``0`` on success, and returns ``-1`` with an exception
1974+
set on failure.
1975+
1976+
If this is not called in the main thread of the main
1977+
interpreter, this function does nothing and returns ``0``.
1978+
The caller must hold an :term:`attached thread state`.
1979+
1980+
.. versionadded:: 3.1
1981+
1982+
.. versionchanged:: 3.12
1983+
This function only runs pending calls in the main interpreter.
1984+
1985+
19671986
.. _profiling:
19681987
19691988
Profiling and Tracing

0 commit comments

Comments
 (0)