summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2014-09-02 22:00:03 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2014-09-02 22:00:03 (GMT)
commita4a3d764f5bc4047858e2a14a54d26c55b1cf0c0 (patch)
tree0377e02cab0bb1813d5c4582b90c3e0c6bfd1229 /generic
parentb15ae226b92170c6bdb640bf648891cfc177a956 (diff)
downloadtcl-a4a3d764f5bc4047858e2a14a54d26c55b1cf0c0.zip
tcl-a4a3d764f5bc4047858e2a14a54d26c55b1cf0c0.tar.gz
tcl-a4a3d764f5bc4047858e2a14a54d26c55b1cf0c0.tar.bz2
Refrain from calling TclFinalizeThreadData() in quick-exit case as it is useless (just memory freeing). Superficially fixes [Bug 132fad6f]; that bug is still exerciseable thanks to recent additions to the test suite that exercise full finalization.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEvent.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 941d566..ab219a6 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1299,18 +1299,20 @@ Tcl_FinalizeThread(void)
TclFinalizeAsync();
TclFinalizeThreadObjects();
}
+ if (TclFullFinalizationRequested()) { /* useless if we are facing a quick-exit */
- /*
- * Blow away all thread local storage blocks.
- *
- * Note that Tcl API allows creation of threads which do not use any Tcl
- * interp or other Tcl subsytems. Those threads might, however, use thread
- * local storage, so we must unconditionally finalize it.
- *
- * Fix [Bug #571002]
- */
-
- TclFinalizeThreadData();
+ /*
+ * Blow away all thread local storage blocks.
+ *
+ * Note that Tcl API allows creation of threads which do not use any Tcl
+ * interp or other Tcl subsytems. Those threads might, however, use thread
+ * local storage, so we must unconditionally finalize it.
+ *
+ * Fix [Bug #571002]
+ */
+
+ TclFinalizeThreadData();
+ }
}
/*