From 70fb72bb490c66f06cdab08ad656c4ce52c71448 Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 18 May 2005 14:34:18 +0000 Subject: '' --- ptw32_threadDestroy.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ptw32_threadDestroy.c') diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index aa95e2c..eb9abfc 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -66,6 +66,17 @@ ptw32_threadDestroy (pthread_t thread) (void) pthread_mutex_destroy(&threadCopy.cancelLock); (void) pthread_mutex_destroy(&threadCopy.threadLock); + +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) + /* + * See documentation for endthread vs endthreadex. + */ + if (threadCopy.threadH != 0) + { + CloseHandle (threadCopy.threadH); + } +#endif + } } /* ptw32_threadDestroy */ -- cgit v1.2.3