fix leaking thread handles on Windows
On Windows, thread handle should be closed explicitly. Co-authored-by: luben karavelov <luben@users.noreply.github.com>
This commit is contained in:
co-authored by
luben karavelov
parent
9a5e73c74e
commit
95073b1af1
@@ -63,6 +63,8 @@ int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr)
|
||||
if (!thread.handle) return 0;
|
||||
|
||||
result = WaitForSingleObject(thread.handle, INFINITE);
|
||||
CloseHandle(thread.handle);
|
||||
|
||||
switch (result) {
|
||||
case WAIT_OBJECT_0:
|
||||
if (value_ptr) *value_ptr = thread.arg;
|
||||
|
||||
Reference in New Issue
Block a user