Skip to content

Commit

Permalink
ggml : release the requested thread pool resource (ggerganov#3292)
Browse files Browse the repository at this point in the history
* Release the requested thread pool resource

* Release the requested thread pool resource 2

---------

Co-authored-by: Zongfu ZF3 Qu <[email protected]>
  • Loading branch information
yancaoweidaode and Zongfu ZF3 Qu authored Sep 28, 2023
1 parent 16bc66d commit 7f1a0fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7f1a0fe

Please sign in to comment.