summaryrefslogtreecommitdiffstats
path: root/generic/tclThread.c
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2014-09-08 22:50:11 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2014-09-08 22:50:11 (GMT)
commit600ace1c4bfd50763dd250e2c271e7fed0fc3bec (patch)
tree616341bd368345187974ca138269b0281c8b3b6f /generic/tclThread.c
parent62004c9fb4615797aed60a748235f07e37bb9802 (diff)
downloadtcl-600ace1c4bfd50763dd250e2c271e7fed0fc3bec.zip
tcl-600ace1c4bfd50763dd250e2c271e7fed0fc3bec.tar.gz
tcl-600ace1c4bfd50763dd250e2c271e7fed0fc3bec.tar.bz2
Refine TclFinalizeThreadData so that the quick-exit optimization really only affects exit.
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
}