Skip to content

Commit

Permalink
Cap the global thread pool at 16 threads.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 5, 2020
1 parent 886a8b1 commit f3a9d04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ std::string CreateRandMAC() {
}

static int DefaultNumWorkers() {
return cpu_info.num_cores;
// Let's cap the global thread pool at 16 threads. Nothing we do really should have much
// use for more...
return std::min(16, cpu_info.num_cores);
}

static int DefaultCpuCore() {
Expand Down

0 comments on commit f3a9d04

Please sign in to comment.