diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2004-11-23 18:06:08 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2004-11-23 18:06:08 (GMT) |
commit | 4c79a83e0c0cb6c68a63c116857a18307cafd9c9 (patch) | |
tree | 8ad4c701e58032b1d996b992d8ae09fa6488d095 /Python/ceval.c | |
parent | 8e6f2ded301055b3e8b61018175cd758ec4ad150 (diff) | |
download | cpython-4c79a83e0c0cb6c68a63c116857a18307cafd9c9.zip cpython-4c79a83e0c0cb6c68a63c116857a18307cafd9c9.tar.gz cpython-4c79a83e0c0cb6c68a63c116857a18307cafd9c9.tar.bz2 |
Hye-Shik Chang's fix for 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().
M Misc/NEWS
M Python/ceval.c
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 4d26a7a..85e3518 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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) { |