]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Hye-Shik Chang's fix for Bug 875692.
authorKurt B. Kaiser <kbk@shore.net>
Tue, 23 Nov 2004 18:06:08 +0000 (18:06 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Tue, 23 Nov 2004 18:06:08 +0000 (18:06 +0000)
Improve signal handling, especially when using threads, by forcing an early
re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not
cleared by Py_MakePendingCalls().

M Misc/NEWS
M Python/ceval.c

Misc/NEWS
Python/ceval.c

index 0bbfb88740829d2e85edd989100ab7e2af62398d..99616395dbdba366061986d79363f399279516e2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -4,6 +4,19 @@ Python News
 
 (editors: check NEWS.help for information about editing NEWS using ReST.)
 
+What's New in Python 2.4 release candidate 2
+=====================================================
+
+*Release date: XX-NOV-2004*
+
+Core and builtins
+-----------------
+
+- Bug 875692: Improve signal handling, especially when using threads, by
+  forcing an early re-execution of PyEval_EvalFrame() "periodic" code when
+  things_to_do is not cleared by Py_MakePendingCalls().
+
+
 What's New in Python 2.4 (release candidate 1|beta 3)
 =====================================================
 
index 4d26a7a7359efad99a6952e7e1429a3207ac47fe..85e35183f5e8924d8b9b3d01d734f496d72e56df 100644 (file)
@@ -786,6 +786,12 @@ PyEval_EvalFrame(PyFrameObject *f)
                                        why = WHY_EXCEPTION;
                                        goto on_error;
                                }
+                               if (things_to_do)
+                                       /* MakePendingCalls() didn't succeed.
+                                          Force early re-execution of this
+                                          "periodic" code, possibly after
+                                          a thread switch */
+                                       _Py_Ticker = 0;
                        }
 #ifdef WITH_THREAD
                        if (interpreter_lock) {