Skip to content

Commit 7f1a0fe

Browse files
yancaoweidaodeZongfu ZF3 Qu
and
Zongfu ZF3 Qu
authored
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 <[email protected]>
1 parent 16bc66d commit 7f1a0fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ static int pthread_create(pthread_t * out, void * unused, thread_ret_t(*func)(vo
8989

9090
static int pthread_join(pthread_t thread, void * unused) {
9191
(void) unused;
92-
return (int) WaitForSingleObject(thread, INFINITE);
92+
int ret = (int) WaitForSingleObject(thread, INFINITE);
93+
CloseHandle(thread);
94+
return ret;
9395
}
9496

9597
static int sched_yield (void) {

0 commit comments

Comments
 (0)