From 78a46f0bd0bb5a5b6d459c7371a4d7c1f066926a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 1 Aug 2011 19:03:12 -0700 Subject: [PATCH] Print an error if the thread fails to exit --- primary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/primary.c b/primary.c index 40455fc..69162ac 100644 --- a/primary.c +++ b/primary.c @@ -408,7 +408,8 @@ void DS8Primary_Destroy(DS8Primary *This) if(This->thread_hdl) { PostThreadMessageA(This->thread_id, WM_QUIT, 0, 0); - WaitForSingleObject(This->thread_hdl, 1000); + if(WaitForSingleObject(This->thread_hdl, 1000) != WAIT_OBJECT_0) + ERR("Thread wait timed out"); CloseHandle(This->thread_hdl); } -- 2.11.4.GIT