diff options
author | dgp <dgp@users.sourceforge.net> | 2014-12-17 20:47:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-12-17 20:47:58 (GMT) |
commit | 200c04016f9228c906561843e82918f62292a1ab (patch) | |
tree | 193346a123c6ef4b3e39952977b53c54d10913cb /generic/tclEvent.c | |
parent | 5c538fa1b96b4a1f0bf417d13cd4ce7f359db158 (diff) | |
download | tcl-200c04016f9228c906561843e82918f62292a1ab.zip tcl-200c04016f9228c906561843e82918f62292a1ab.tar.gz tcl-200c04016f9228c906561843e82918f62292a1ab.tar.bz2 |
Rework the *FinalizeThread*() routines so that the quick exit preferencebug_af08e89777
is respected without need to run afoul of encoding finalizations.
tests pass now. All changes are fully internal.
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r-- | generic/tclEvent.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 3985767..6ca22a6 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -119,6 +119,7 @@ static char * VwaitVarProc(ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); static void InvokeExitHandlers(void); +static void FinalizeThread(int quick); /* *---------------------------------------------------------------------- @@ -983,7 +984,7 @@ Tcl_Exit( * Tcl_Channels that may have data enqueued. */ - Tcl_FinalizeThread(); + FinalizeThread(/* quick */ 1); } TclpExit(status); Tcl_Panic("OS exit failed!"); @@ -1183,7 +1184,7 @@ Tcl_Finalize(void) * This fixes the Tcl Bug #990552. */ - TclFinalizeThreadData(); + TclFinalizeThreadData(/* quick */ 0); /* * Now we can free constants for conversions to/from double. @@ -1269,6 +1270,13 @@ Tcl_Finalize(void) void Tcl_FinalizeThread(void) { + FinalizeThread(/* quick */ 0); +} + +void +FinalizeThread( + int quick) +{ ExitHandler *exitPtr; ThreadSpecificData *tsdPtr; @@ -1309,7 +1317,7 @@ Tcl_FinalizeThread(void) * * Fix [Bug #571002] */ - TclFinalizeThreadData(); + TclFinalizeThreadData(quick); } /* |