summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ggml.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ggml.c b/ggml.c
index ea964bab..078b2c42 100644
--- a/ggml.c
+++ b/ggml.c
@@ -89,7 +89,9 @@ static int pthread_create(pthread_t * out, void * unused, thread_ret_t(*func)(vo
static int pthread_join(pthread_t thread, void * unused) {
(void) unused;
- return (int) WaitForSingleObject(thread, INFINITE);
+ int ret = (int) WaitForSingleObject(thread, INFINITE);
+ CloseHandle(thread);
+ return ret;
}
static int sched_yield (void) {