diff options
author | dgp@users.sourceforge.net <dgp> | 2015-07-17 21:22:22 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2015-07-17 21:22:22 (GMT) |
commit | dee9a9cbe77ea21d498f9c6c3885df0a93c8da50 (patch) | |
tree | eb303b04e47fe05468dc5620171a0ee2c8453095 /generic/tclThread.c | |
parent | 3b5dff82b3bea4153a4034c95ebdc7af76076428 (diff) | |
parent | 77985b9936c999f8cbcb0f87825fedb45afada9a (diff) | |
download | tcl-dee9a9cbe77ea21d498f9c6c3885df0a93c8da50.zip tcl-dee9a9cbe77ea21d498f9c6c3885df0a93c8da50.tar.gz tcl-dee9a9cbe77ea21d498f9c6c3885df0a93c8da50.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r-- | generic/tclThread.c | 15 |
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 } /* |