Commit 123506b1 authored by Dominik Charousset's avatar Dominik Charousset

Fix computation of deserialization worker count

parent b628ea47
...@@ -58,7 +58,7 @@ disable-tcp=false ...@@ -58,7 +58,7 @@ disable-tcp=false
enable-udp=false enable-udp=false
; configures how many background workers are spawned for deserialization, ; configures how many background workers are spawned for deserialization,
; by default CAF uses 1-4 workers depending on the number of cores ; by default CAF uses 1-4 workers depending on the number of cores
workers=<max(3, number of cores / 4) + 1> workers=<min(3, number of cores / 4) + 1>
; when compiling with logging enabled ; when compiling with logging enabled
[logger] [logger]
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <thread> #include <thread>
using std::max; using std::max;
using std::min;
namespace { namespace {
...@@ -94,7 +95,7 @@ const size_t max_consecutive_reads = 50; ...@@ -94,7 +95,7 @@ const size_t max_consecutive_reads = 50;
const size_t heartbeat_interval = 0; const size_t heartbeat_interval = 0;
const size_t cached_udp_buffers = 10; const size_t cached_udp_buffers = 10;
const size_t max_pending_msgs = 10; const size_t max_pending_msgs = 10;
const size_t workers = max(3u, std::thread::hardware_concurrency() / 4u) + 1; const size_t workers = min(3u, std::thread::hardware_concurrency() / 4u) + 1;
} // namespace middleman } // namespace middleman
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment