drivers/timers_win32/timers_win32.c
changeset 606 15a175f6305d
parent 605 f91ee161b3a1
parent 602 cbf29cccec18
child 629 b9274b595650
--- a/drivers/timers_win32/timers_win32.c	Thu Oct 08 17:21:15 2009 +0200
+++ b/drivers/timers_win32/timers_win32.c	Thu Oct 08 17:34:44 2009 +0200
@@ -70,7 +70,10 @@
 
 void WaitReceiveTaskEnd(TASK_HANDLE *Thread)
 {
-	WaitForSingleObject(*Thread, INFINITE);
+	if(WaitForSingleObject(*Thread, 1000) == WAIT_TIMEOUT)
+	{
+		TerminateThread(*Thread, -1);
+	}
 	CloseHandle(*Thread);
 }
 
@@ -121,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);
 }