query the online, not total, CPUs in case some were shut off
This commit is contained in:
parent
123f3fd962
commit
dba712acf6
|
|
@ -434,8 +434,8 @@ void ThreadSetDefault (void)
|
||||||
{
|
{
|
||||||
if (numthreads == -1) // not set manually
|
if (numthreads == -1) // not set manually
|
||||||
{
|
{
|
||||||
#ifdef _SC_NPROCESSORS_CONF
|
#ifdef _SC_NPROCESSORS_ONLN
|
||||||
long cpus = sysconf(_SC_NPROCESSORS_CONF);
|
long cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||||
if (cpus > 0)
|
if (cpus > 0)
|
||||||
numthreads = cpus;
|
numthreads = cpus;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user