summaryrefslogtreecommitdiffstats
path: root/win/tclWinTime.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2004-04-23 07:12:08 (GMT)
committerdavygrvy <davygrvy@pobox.com>2004-04-23 07:12:08 (GMT)
commitf613f9eed33b82c3d712a4679fa56e3192d9e283 (patch)
tree71be5c2cc2b2545f5f69c1cf9c0521ca066710fa /win/tclWinTime.c
parent13db606302781a0c0ed2863d863866fa650d884f (diff)
downloadtcl-f613f9eed33b82c3d712a4679fa56e3192d9e283.zip
tcl-f613f9eed33b82c3d712a4679fa56e3192d9e283.tar.gz
tcl-f613f9eed33b82c3d712a4679fa56e3192d9e283.tar.bz2
* win/tclWinTime.c: If the Tcl_ExitProc (StopCalibration) is
called from the stack frame of DllMain's PROCESS_DETACH, the wait operation should timeout and continue.
Diffstat (limited to 'win/tclWinTime.c')
-rw-r--r--win/tclWinTime.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 931f906..2c10978 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinTime.c,v 1.24 2004/04/06 22:25:58 dgp Exp $
+ * RCS: @(#) $Id: tclWinTime.c,v 1.25 2004/04/23 07:12:08 davygrvy Exp $
*/
#include "tclInt.h"
@@ -434,7 +434,11 @@ StopCalibration( ClientData unused )
/* Client data is unused */
{
SetEvent( timeInfo.exitEvent );
- WaitForSingleObject( timeInfo.calibrationThread, INFINITE );
+ /*
+ * If Tcl_Finalize was called from DllMain, the calibration thread
+ * is in a paused state so we need to timeout and continue.
+ */
+ WaitForSingleObject( timeInfo.calibrationThread, 100 );
CloseHandle( timeInfo.exitEvent );
CloseHandle( timeInfo.calibrationThread );
}