From ab94b8a7fdad8b00a957ec28ef0ab904184fd8fb Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 20 Dec 2007 10:23:40 +0000 Subject: fixed race condition --- threads.c | 1 + 1 file changed, 1 insertion(+) (limited to 'threads.c') diff --git a/threads.c b/threads.c index 04eea8f1..ea79c380 100644 --- a/threads.c +++ b/threads.c @@ -112,6 +112,7 @@ dbgprintf("Terminate thread %lx via method %d\n", pThis->thrdID, pThis->eTermToo /* TODO: TIMEOUT! */ } else if(pThis->eTermTool == eTermSync_NONE) { pthread_cancel(pThis->thrdID); + pthread_join(pThis->thrdID, NULL); /* wait for cancel to complete */ } pThis->bIsActive = 0; -- cgit v1.2.3