Attachment "thread-cleanup-doc.patch" to
ticket [3cc1d91345]
added by
gustafn2
2016-10-07 13:12:11.
Index: generic/tclThreadAlloc.c
==================================================================
--- generic/tclThreadAlloc.c
+++ generic/tclThreadAlloc.c
@@ -1104,13 +1104,13 @@
/*
*----------------------------------------------------------------------
*
* TclFinalizeThreadAllocThread --
*
- * This procedure is used to destroy single thread private resources used
- * in this file.
- * Called in TclpFinalizeThreadData when a thread exits (Tcl_FinalizeThread).
+ * This procedure is used to destroy single thread private resources
+ * defined in this file. Called either during Tcl_FinalizeThread() or
+ * Tcl_Finalize().
*
* Results:
* None.
*
* Side effects:
Index: win/tclWinThrd.c
==================================================================
--- win/tclWinThrd.c
+++ win/tclWinThrd.c
@@ -1010,12 +1010,14 @@
{
BOOL success;
if (ptr != NULL) {
/*
- * Called by us in TclpFinalizeThreadData when a thread exits and
- * destroys the tsd key which stores allocator caches.
+ * Called by TclFinalizeThreadAlloc() and
+ * TclFinalizeThreadAllocThread() during Tcl_Finalize() or
+ * Tcl_FinalizeThread(). This function destroys the tsd key which
+ * stores allocator caches in thread local storage.
*/
TclFreeAllocCache(ptr);
success = TlsSetValue(tlsKey, NULL);
if (!success) {