File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -462,11 +462,15 @@ int BLASFUNC(blas_thread_shutdown)(void){
462
462
463
463
for (i = 0 ; i < blas_num_threads - 1 ; i ++ ){
464
464
// Could also just use WaitForMultipleObjects
465
- WaitForSingleObject (blas_threads [i ], 5 ); //INFINITE);
465
+ DWORD wait_thread_value = WaitForSingleObject (blas_threads [i ], 5000 );
466
+
466
467
#ifndef OS_WINDOWSSTORE
467
- // TerminateThread is only available with WINAPI_DESKTOP and WINAPI_SYSTEM not WINAPI_APP in UWP
468
- TerminateThread (blas_threads [i ],0 );
468
+ // TerminateThread is only available with WINAPI_DESKTOP and WINAPI_SYSTEM not WINAPI_APP in UWP
469
+ if (WAIT_OBJECT_0 != wait_thread_value ) {
470
+ TerminateThread (blas_threads [i ],0 );
471
+ }
469
472
#endif
473
+
470
474
CloseHandle (blas_threads [i ]);
471
475
}
472
476
You can’t perform that action at this time.
0 commit comments