Skip to content

Commit c34616c

Browse files
committed
Add note about the GC and remote debugging to PyErr_CheckSignals().
1 parent 7ebe924 commit c34616c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Doc/c-api/exceptions.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,9 @@ Signal Handling
686686
other pending signals may not have been handled yet: they will be on the
687687
next :c:func:`PyErr_CheckSignals()` invocation).
688688
689-
If the function is called from a non-main thread, or under a non-main
690-
Python interpreter, it does nothing and returns ``0``.
689+
This function may invoke the garbage collector or execute a :ref:`remote
690+
debugger <remote-debugging>` script, regardless of the calling thread
691+
or Python interpreter.
691692
692693
This function can be called by long-running C code that wants to
693694
be interruptible by user requests (such as by pressing Ctrl-C).
@@ -696,6 +697,13 @@ Signal Handling
696697
The default Python signal handler for :c:macro:`!SIGINT` raises the
697698
:exc:`KeyboardInterrupt` exception.
698699
700+
.. versionchanged:: 3.12
701+
This function may now invoke the garbage collector.
702+
703+
.. versionchanged:: 3.14
704+
This function may now execute a remote debugger script, if remote
705+
debugging is enabled.
706+
699707
700708
.. c:function:: void PyErr_SetInterrupt()
701709

0 commit comments

Comments
 (0)