diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2006-02-03 22:40:34 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2006-02-03 22:40:34 (GMT) |
commit | 51ddd5a45da227a9718bf993329d7bd0c885c5c1 (patch) | |
tree | fa6ca35edad79040262c46c428c35e95ac6df2c6 /generic | |
parent | 43f5e43d9f03dbaadba6d0376fbb16f6adee3468 (diff) | |
download | tk-51ddd5a45da227a9718bf993329d7bd0c885c5c1.zip tk-51ddd5a45da227a9718bf993329d7bd0c885c5c1.tar.gz tk-51ddd5a45da227a9718bf993329d7bd0c885c5c1.tar.bz2 |
Comment formatting
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkEvent.c | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 80609bd..91a286e 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.32 2006/01/20 18:58:55 jenglish Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.33 2006/02/03 22:40:34 dkf Exp $ */ #include "tkPort.h" @@ -1884,23 +1884,24 @@ TkCreateExitHandler( Tcl_MutexLock(&exitMutex); /* - * The call to TclInExit() is disabled here. That's a private - * Tcl routine, and calling it is causing some trouble with portability - * of building Tk. We should avoid private Tcl routines generally. + * The call to TclInExit() is disabled here. That's a private Tcl routine, + * and calling it is causing some trouble with portability of building Tk. + * We should avoid private Tcl routines generally. * - * In this case, the TclInExit() call is being used only to prevent - * a Tcl_CreateExitHandler() call when Tcl finalization is in progress. - * That's a situation that shouldn't happen anyway. Recent changes - * within Tcl_Finalize now cause a Tcl_Panic() to happen if exit - * handlers get added after exit handling is complete. By disabling - * the guard here, that panic will serve to help us find the buggy - * conditions and correct them. + * In this case, the TclInExit() call is being used only to prevent a + * Tcl_CreateExitHandler() call when Tcl finalization is in progress. + * That's a situation that shouldn't happen anyway. Recent changes within + * Tcl_Finalize now cause a Tcl_Panic() to happen if exit handlers get + * added after exit handling is complete. By disabling the guard here, + * that panic will serve to help us find the buggy conditions and correct + * them. * - * We can restore this guard if we find we must (hopefully getting - * public access to TclInExit() if we discover extensions really do - * need this), but during alpha development, this is a good time to - * dig in and find the root causes of finalization bugs. + * We can restore this guard if we find we must (hopefully getting public + * access to TclInExit() if we discover extensions really do need this), + * but during alpha development, this is a good time to dig in and find + * the root causes of finalization bugs. */ + if (firstExitPtr == NULL/* && !TclInExit()*/) { Tcl_CreateExitHandler(TkFinalize, NULL); } @@ -1979,7 +1980,11 @@ TkCreateThreadExitHandler( exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler)); exitPtr->proc = proc; exitPtr->clientData = clientData; - /* See comments in TkCreateExitHandler */ + + /* + * See comments in TkCreateExitHandler(). + */ + if (tsdPtr->firstExitPtr == NULL/* && !TclInExit()*/) { Tcl_CreateThreadExitHandler(TkFinalizeThread, NULL); } |