Overview
| Artifact ID: | de7f071b2cc2bd048af4bc824da192c6648b4f7a |
|---|---|
| Ticket: | 132fad6fde1b40e8f1e2081884313a98fdd1d4cc
exit 0 - Hangs under Windows |
| User & Date: | ferrieux on 2014-09-02 19:51:27 |
Changes
- icomment:
Though Sean identified the critical commit as 4ca7fe7cf209ccf83375421d45464ff9a5f90a29 (use of TclpSysFree et al), which could be fixed, I don't think TclFinalizeThreadAllocThread is useful at exit time. Following trivial patch removes it in that case: Index: generic/tclEvent.c ================================================================== --- generic/tclEvent.c +++ generic/tclEvent.c @@ -1297,22 +1297,24 @@ TclFinalizeIOSubsystem(); TclFinalizeNotifier(); TclFinalizeAsync(); TclFinalizeThreadObjects(); } + if (!TclInExit()) { /* useless if we are facing 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(); + } } /* *---------------------------------------------------------------------- * - login: "ferrieux"
- mimetype: "text/plain"