Problem with omp_set_num_threads called from a WinAPI thread
问题 I've run into a funny problem using OpenMP v2 under MSVC 9 SP1. when calling omp_set_num_threads from the main thread of execution then using omp_get_num_threads to check the amount set, all works well and checks out. However, in an GUI app, I call the same thing, but its own thread(created with CreateThread ), to prevent the UI from becoming unresponsive, how ever it seems that omp_set_num_threads doesn't work when called from a thread, as omp_get_num_threads always reports 1, and from tests