summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-11-21 01:04:21 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-11-21 01:04:21 (GMT)
commitb9a4501179eec7762fcf3536833707f58d2474d2 (patch)
tree3bad8bed599dae83840223a687aaa98c70ef1895 /Python/ceval.c
parent527d4ace8537a4db6dca65955a41470be4f07269 (diff)
downloadcpython-b9a4501179eec7762fcf3536833707f58d2474d2.zip
cpython-b9a4501179eec7762fcf3536833707f58d2474d2.tar.gz
cpython-b9a4501179eec7762fcf3536833707f58d2474d2.tar.bz2
Issue #21963: backout issue #1856 patch (avoid crashes and lockups when
daemon threads run while the interpreter is shutting down; instead, these threads are now killed when they try to take the GIL), as it seems to break some existing code.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index dad5e1c..682a1e7 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -355,12 +355,6 @@ PyEval_RestoreThread(PyThreadState *tstate)
if (interpreter_lock) {
int err = errno;
PyThread_acquire_lock(interpreter_lock, 1);
- /* _Py_Finalizing is protected by the GIL */
- if (_Py_Finalizing && tstate != _Py_Finalizing) {
- PyThread_release_lock(interpreter_lock);
- PyThread_exit_thread();
- assert(0); /* unreachable */
- }
errno = err;
}
#endif
@@ -1025,12 +1019,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PyThread_acquire_lock(interpreter_lock, 1);
- /* Check if we should make a quick exit. */
- if (_Py_Finalizing && _Py_Finalizing != tstate) {
- PyThread_release_lock(interpreter_lock);
- PyThread_exit_thread();
- }
-
if (PyThreadState_Swap(tstate) != NULL)
Py_FatalError("ceval: orphan tstate");