diff Python/ceval.c @ 34065:4e254f028b76 2.3

Taken from 2.4/HEAD: - 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().
author Matthias Klose <doko@ubuntu.com>
date Wed, 01 Dec 2004 07:36:58 +0000
parents 96ecaab4cba6
children
line wrap: on
line diff
--- a/Python/ceval.c	Thu Nov 11 06:16:42 2004 +0000
+++ b/Python/ceval.c	Wed Dec 01 07:36:58 2004 +0000
@@ -785,6 +785,12 @@
 					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;
 			}
 #if !defined(HAVE_SIGNAL_H) || defined(macintosh)
 			/* If we have true signals, the signal handler