Merge pull request #3147 from animalize/dev
fix leaking thread handles on Windows
This commit is contained in:
@@ -63,6 +63,8 @@ int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr)
|
|||||||
if (!thread.handle) return 0;
|
if (!thread.handle) return 0;
|
||||||
|
|
||||||
result = WaitForSingleObject(thread.handle, INFINITE);
|
result = WaitForSingleObject(thread.handle, INFINITE);
|
||||||
|
CloseHandle(thread.handle);
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
if (value_ptr) *value_ptr = thread.arg;
|
if (value_ptr) *value_ptr = thread.arg;
|
||||||
|
|||||||
Reference in New Issue
Block a user