Added timeout for waiting timer thread end on windows.
authoredouard
Mon, 05 Oct 2009 14:31:55 +0200
changeset 599 b2d2c3fab094
parent 598 fff217764431
child 601 efb6e88ad27f
Added timeout for waiting timer thread end on windows.
drivers/timers_win32/timers_win32.c
--- a/drivers/timers_win32/timers_win32.c	Mon Oct 05 11:35:40 2009 +0200
+++ b/drivers/timers_win32/timers_win32.c	Mon Oct 05 14:31:55 2009 +0200
@@ -124,7 +124,10 @@
 
 	stop_timer = 1;
 	setTimer(0);
-	WaitForSingleObject(timer_thread, INFINITE);
+	if(WaitForSingleObject(timer_thread,1000) == WAIT_TIMEOUT)
+	{
+		TerminateThread(timer_thread, -1);
+	}
 	CloseHandle(timer);
 	CloseHandle(timer_thread);
 }