Not all online CPUs may be available for the current process, especially when CPU affinity is involved. In such cases too many threads will be created, which will unnecessarily compete for CPU time.
Use sched_getaffinity() (if available) to determine the correct number of threads to create.
Not all online CPUs may be available for the current process, especially when CPU affinity is involved. In such cases too many threads will be created, which will unnecessarily compete for CPU time.
Use sched_getaffinity() (if available) to determine the correct number of threads to create.