summaryrefslogtreecommitdiffstats
path: root/generic/tclThread.c
diff options
context:
space:
mode:
authorferrieux <ferrieux@noemail.net>2014-09-08 22:50:11 (GMT)
committerferrieux <ferrieux@noemail.net>2014-09-08 22:50:11 (GMT)
commit012a0523f81e6f133c76b1cf9e61800a9777b282 (patch)
treedb6387f5f91b421a910848987d7ac56286c85769 /generic/tclThread.c
parent4ae915cdcb40868fa60bf909d28f790361948988 (diff)
downloadtcl-012a0523f81e6f133c76b1cf9e61800a9777b282.zip
tcl-012a0523f81e6f133c76b1cf9e61800a9777b282.tar.gz
tcl-012a0523f81e6f133c76b1cf9e61800a9777b282.tar.bz2
Refine TclFinalizeThreadData so that the quick-exit optimization really only affects exit.
FossilOrigin-Name: c16bc1a7db0f492efbe372dbb743c7fcc6d0ead0
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r--generic/tclThread.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 8c972a8..5ac6a8d 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -357,7 +357,12 @@ TclFinalizeThreadData(void)
{
TclFinalizeThreadDataThread();
#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
- TclFinalizeThreadAllocThread();
+ if ((!TclInExit())||TclFullFinalizationRequested()) {
+ /*
+ * Quick exit principle makes it useless to terminate allocators
+ */
+ TclFinalizeThreadAllocThread();
+ }
#endif
}