summaryrefslogtreecommitdiff
path: root/ggml.c
diff options
context:
space:
mode:
authorQu Zongfu <43257352+yancaoweidaode@users.noreply.github.com>2023-09-29 03:51:52 +0800
committerGitHub <noreply@github.com>2023-09-28 22:51:52 +0300
commit7f1a0fe709ea1a861da2f3759f58a28bf8953c12 (patch)
tree6348c83466a60500fc548c29f0953ac53f36c4cf /ggml.c
parent16bc66d9479edd5ee12ec734973554d4493c5dfa (diff)
ggml : release the requested thread pool resource (#3292)
* Release the requested thread pool resource * Release the requested thread pool resource 2 --------- Co-authored-by: Zongfu ZF3 Qu <quzf3@Lenovo.com>
Diffstat (limited to 'ggml.c')
-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) {