1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix selection of # threads, set default to 1 thread

This commit is contained in:
kwolekr 2013-02-23 22:06:16 -05:00
parent 28c50c16cd
commit f00d136ab1
2 changed files with 2 additions and 3 deletions

View file

@ -56,8 +56,7 @@ EmergeManager::EmergeManager(IGameDef *gamedef, BiomeDefManager *bdef) {
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");
}