summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-06-17 06:07:15 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-06-17 06:07:15 (GMT)
commite6bfdb9ca592382fc0a2f976dcf6d290f364220d (patch)
tree7495a8455cda166e56551d0dd9cb3ef6dc44b3b6 /Python/ceval.c
parent61f1acca5583b1a3f051cd29d09d71792f2aa7f4 (diff)
parent17548dda51ddd2fdc7641d8808b8f458f7f339fe (diff)
downloadcpython-e6bfdb9ca592382fc0a2f976dcf6d290f364220d.zip
cpython-e6bfdb9ca592382fc0a2f976dcf6d290f364220d.tar.gz
cpython-e6bfdb9ca592382fc0a2f976dcf6d290f364220d.tar.bz2
merge 3.4
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 3ede055..2dbf591 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1267,6 +1267,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
/* Other threads may run now */
take_gil(tstate);
+
+ /* Check if we should make a quick exit. */
+ if (_Py_Finalizing && _Py_Finalizing != tstate) {
+ drop_gil(tstate);
+ PyThread_exit_thread();
+ }
+
if (PyThreadState_Swap(tstate) != NULL)
Py_FatalError("ceval: orphan tstate");
}