threadpoolctl
threadpoolctl copied to clipboard
Calling threadpool_info in cython parallel block may cause a deadlock
When there are multiple OpenMP loaded. Replacing 0 by any other thread_num (below) can cause the issue.
with nogil, parallel():
if openmp.omp_get_thread_num() == 0:
with gil:
threadpool_info()
I'm not sure if it's a real issue. It means that trying to control the number of inner threads independently in each outer threads is a bad idea. But I think it's not the purpose of threadpoolctl.