From a2942456ef7c88fba952851bdd94c1951c59dd4d Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Wed, 13 Nov 2013 10:00:18 +0800 Subject: [PATCH] Refs #307. Fixed the hang bug when free OpenBLAS dll in Windows. --- driver/others/blas_server_win32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c index bd1069c5e..8723a6fa7 100644 --- a/driver/others/blas_server_win32.c +++ b/driver/others/blas_server_win32.c @@ -441,9 +441,10 @@ int BLASFUNC(blas_thread_shutdown)(void){ if (blas_server_avail){ SetEvent(pool.killed); - + printf("blas_num_threads=%d\n", blas_num_threads); for(i = 0; i < blas_num_threads - 1; i++){ - WaitForSingleObject(blas_threads[i], INFINITE); + WaitForSingleObject(blas_threads[i], 5); //INFINITE); + TerminateThread(blas_threads[i],0); } blas_server_avail = 0;