driver: more reasonable thread wait timeout on Windows.
It used to be 5ms, which might not be long enough in some cases for the thread to exit well, but then when set to 5000 (5s), it would slow down any program depending on OpenBlas. Let's just set it to 50ms, which is at least 10 times longer than originally, but still reasonable in case of failed thread termination.
This commit is contained in:
parent
1a6ea8ee6d
commit
13226e3101
|
@ -462,7 +462,7 @@ int BLASFUNC(blas_thread_shutdown)(void){
|
||||||
|
|
||||||
for(i = 0; i < blas_num_threads - 1; i++){
|
for(i = 0; i < blas_num_threads - 1; i++){
|
||||||
// Could also just use WaitForMultipleObjects
|
// Could also just use WaitForMultipleObjects
|
||||||
DWORD wait_thread_value = WaitForSingleObject(blas_threads[i], 5000);
|
DWORD wait_thread_value = WaitForSingleObject(blas_threads[i], 50);
|
||||||
|
|
||||||
#ifndef OS_WINDOWSSTORE
|
#ifndef OS_WINDOWSSTORE
|
||||||
// TerminateThread is only available with WINAPI_DESKTOP and WINAPI_SYSTEM not WINAPI_APP in UWP
|
// TerminateThread is only available with WINAPI_DESKTOP and WINAPI_SYSTEM not WINAPI_APP in UWP
|
||||||
|
|
Loading…
Reference in New Issue