File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -850,6 +850,11 @@ void goto_set_num_threads(int num_threads) {
850
850
851
851
long i ;
852
852
853
+ #ifdef SMP_SERVER
854
+ // Handle lazy re-init of the thread-pool after a POSIX fork
855
+ if (unlikely (blas_server_avail == 0 )) blas_thread_init ();
856
+ #endif
857
+
853
858
if (num_threads < 1 ) num_threads = blas_num_threads ;
854
859
855
860
#ifndef NO_AFFINITY
Original file line number Diff line number Diff line change @@ -478,7 +478,12 @@ int BLASFUNC(blas_thread_shutdown)(void){
478
478
479
479
void goto_set_num_threads (int num_threads )
480
480
{
481
- long i ;
481
+ long i ;
482
+
483
+ #if defined(SMP_SERVER ) && defined(OS_CYGWIN_NT )
484
+ // Handle lazy re-init of the thread-pool after a POSIX fork
485
+ if (unlikely (blas_server_avail == 0 )) blas_thread_init ();
486
+ #endif
482
487
483
488
if (num_threads < 1 ) num_threads = blas_cpu_number ;
484
489
You can’t perform that action at this time.
0 commit comments