diff options
author | ferrieux <ferrieux@noemail.net> | 2014-09-02 22:00:03 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@noemail.net> | 2014-09-02 22:00:03 (GMT) |
commit | 90d91f6a893e6db527d04f920b2a9da23854e88a (patch) | |
tree | 1060add6b17df596fbc1128d6a7c58b444714b2b /generic/tclEvent.c | |
parent | 4a10c1fa13baddd9bb0badc9fc2090f1a7e6419b (diff) | |
download | tcl-90d91f6a893e6db527d04f920b2a9da23854e88a.zip tcl-90d91f6a893e6db527d04f920b2a9da23854e88a.tar.gz tcl-90d91f6a893e6db527d04f920b2a9da23854e88a.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.
FossilOrigin-Name: 3ec5b57e640f42c7c8b41e02daa06028fa398bfb
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r-- | generic/tclEvent.c | 24 |
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(); + } } /* |