summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-06-17 06:49:02 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-06-17 06:49:02 (GMT)
commit95d75194ac2a96bef077d8ac6c5879c14ca8bb08 (patch)
tree91ceae493464b0ee9c79194e522e305c14169f08
parent9db281662ded4e855cd8fbdfb8061efbbce282e3 (diff)
downloadcpython-95d75194ac2a96bef077d8ac6c5879c14ca8bb08.zip
cpython-95d75194ac2a96bef077d8ac6c5879c14ca8bb08.tar.gz
cpython-95d75194ac2a96bef077d8ac6c5879c14ca8bb08.tar.bz2
remove extra call to tstate_delete_common (merge artifact)
-rw-r--r--Python/pystate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 8c1fad2..7afca17 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -423,6 +423,8 @@ PyThreadState_DeleteCurrent()
Py_FatalError(
"PyThreadState_DeleteCurrent: no current tstate");
_Py_atomic_store_relaxed(&_PyThreadState_Current, NULL);
+ if (autoInterpreterState && PyThread_get_key_value(autoTLSkey) == tstate)
+ PyThread_delete_key_value(autoTLSkey);
/*
Only call tstate_delete_common to have the tstate if we're not finalizing
or we're the main thread. The main thread will do this for us. Not calling
@@ -431,9 +433,6 @@ PyThreadState_DeleteCurrent()
*/
if (!_Py_Finalizing || _Py_Finalizing == tstate)
tstate_delete_common(tstate);
- if (autoInterpreterState && PyThread_get_key_value(autoTLSkey) == tstate)
- PyThread_delete_key_value(autoTLSkey);
- tstate_delete_common(tstate);
PyEval_ReleaseLock();
}
#endif /* WITH_THREAD */