Skip to content

Commit

Permalink
num_emerge_threads: Initialise value to cope with setting syntax error (
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat authored and nerzhul committed Mar 18, 2019
1 parent 77cfc4f commit c0fb5dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/emerge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ EmergeManager::EmergeManager(Server *server)

enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");

// If unspecified, leave a proc for the main thread and one for
// some other misc thread
s16 nthreads;
s16 nthreads = 1;
g_settings->getS16NoEx("num_emerge_threads", nthreads);
// If automatic, leave a proc for the main thread and one for
// some other misc thread
if (nthreads == 0)
nthreads = Thread::getNumberOfProcessors() - 2;
if (nthreads < 1)
Expand Down

0 comments on commit c0fb5dd

Please sign in to comment.