We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 08fa83a + 1f60715 commit 3da6d66Copy full SHA for 3da6d66
driver/others/blas_server_win32.c
@@ -462,11 +462,15 @@ int BLASFUNC(blas_thread_shutdown)(void){
462
463
for(i = 0; i < blas_num_threads - 1; i++){
464
// Could also just use WaitForMultipleObjects
465
- WaitForSingleObject(blas_threads[i], 5); //INFINITE);
+ DWORD wait_thread_value = WaitForSingleObject(blas_threads[i], 5000);
466
+
467
#ifndef OS_WINDOWSSTORE
-// TerminateThread is only available with WINAPI_DESKTOP and WINAPI_SYSTEM not WINAPI_APP in UWP
468
- TerminateThread(blas_threads[i],0);
+ // 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
+ }
472
#endif
473
474
CloseHandle(blas_threads[i]);
475
}
476
0 commit comments