https://github.com/python/cpython/commit/ce701032a3d5d3597466d5836ebe989db6eda2aa commit: ce701032a3d5d3597466d5836ebe989db6eda2aa branch: main author: Peter Bierma <[email protected]> committer: ZeroIntensity <[email protected]> date: 2025-11-20T08:42:01-05:00 summary:
gh-141004: Document `Py_MakePendingCalls` (GH-141137) Co-authored-by: Victor Stinner <[email protected]> files: M Doc/c-api/init.rst diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 3cac2c8b213c80..4a841c9e3c8f9a 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1891,6 +1891,25 @@ pointer and a void pointer argument. This function now always schedules *func* to be run in the main interpreter. + +.. c:function:: int Py_MakePendingCalls(void) + + Execute all pending calls. This is usually executed automatically by the + interpreter. + + This function returns ``0`` on success, and returns ``-1`` with an exception + set on failure. + + If this is not called in the main thread of the main + interpreter, this function does nothing and returns ``0``. + The caller must hold an :term:`attached thread state`. + + .. versionadded:: 3.1 + + .. versionchanged:: 3.12 + This function only runs pending calls in the main interpreter. + + .. _profiling: Profiling and Tracing _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
