diff options
Diffstat (limited to 'generic/tclAsync.c')
-rw-r--r-- | generic/tclAsync.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclAsync.c b/generic/tclAsync.c index f036b47..9a78c8f 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.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: tclAsync.c,v 1.6.12.2 2008/04/26 11:37:47 vasiljevic Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.6.12.3 2008/04/27 08:18:13 vasiljevic Exp $ */ #include "tclInt.h" @@ -294,6 +294,14 @@ Tcl_AsyncDelete(async) AsyncHandler *prevPtr, *thisPtr; /* + * Assure early handling of the constraint + */ + + if (asyncPtr->originThrdId != Tcl_GetCurrentThread()) { + panic("Tcl_AsyncDelete: async handler deleted by the wrong thread"); + } + + /* * If we come to this point when TSD's for the current * thread have already been garbage-collected, we are * in the _serious_ trouble. OTOH, we tolerate calling |