summaryrefslogtreecommitdiffstats
path: root/generic/tclThread.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-17 21:22:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-17 21:22:22 (GMT)
commit5234a59846f046760830b06488e2d214d0b2cf04 (patch)
treeeb303b04e47fe05468dc5620171a0ee2c8453095 /generic/tclThread.c
parent2fc3c8d6596a5d180b7f2c13451e8ec26144cb2b (diff)
parentad86656b196a9b34f2df43327c816d8099d7f3c8 (diff)
downloadtcl-5234a59846f046760830b06488e2d214d0b2cf04.zip
tcl-5234a59846f046760830b06488e2d214d0b2cf04.tar.gz
tcl-5234a59846f046760830b06488e2d214d0b2cf04.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r--generic/tclThread.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c
index d1f2691..198fa6a 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -339,8 +339,9 @@ Tcl_ConditionFinalize(
*
* TclFinalizeThreadData --
*
- * This function cleans up the thread-local storage. This is called once
- * for each thread.
+ * This function cleans up the thread-local storage. Secondary, it cleans
+ * thread alloc cache.
+ * This is called once for each thread before thread exits.
*
* Results:
* None.
@@ -352,9 +353,17 @@ Tcl_ConditionFinalize(
*/
void
-TclFinalizeThreadData(void)
+TclFinalizeThreadData(int quick)
{
TclFinalizeThreadDataThread();
+#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
+ if (!quick) {
+ /*
+ * Quick exit principle makes it useless to terminate allocators
+ */
+ TclFinalizeThreadAllocThread();
+ }
+#endif
}
/*