settings->setDefault("emergequeue_limit_total", "256");
settings->setDefault("emergequeue_limit_diskonly", "");
settings->setDefault("emergequeue_limit_generate", "");
- settings->setDefault("num_emerge_threads", "");
+ settings->setDefault("num_emerge_threads", "1");
// physics stuff
settings->setDefault("movement_acceleration_default", "3");
if (g_settings->get("num_emerge_threads").empty()) {
int nprocs = porting::getNumberOfProcessors();
// leave a proc for the main thread and one for some other misc threads
- if (nprocs > 2)
- nthreads = nprocs - 2;
+ nthreads = (nprocs > 2) ? nthreads = nprocs - 2 : 1;
} else {
nthreads = g_settings->getU16("num_emerge_threads");
}