From 13d51f0df0e5fced4a69c0f77587e18c2d14c047 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 3 Oct 2017 10:05:56 -0400 Subject: [PATCH] add extra thread allowance for blocking CLI code make sure not to run with a single thread if only one CPU core is present proper fix pending: convert CLI code to non-blocking, muxed, using streambuf interface closes #399 Change-Id: I09a6d758c668fe6a2bbe6735e3299d3c8cb1ba58 --- daemon/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index b31266b40..a3e05023f 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -651,9 +651,9 @@ int main(int argc, char **argv) { if (num_threads < 1) { #ifdef _SC_NPROCESSORS_ONLN - num_threads = sysconf( _SC_NPROCESSORS_ONLN ); + num_threads = sysconf( _SC_NPROCESSORS_ONLN ) + 3; #endif - if (num_threads < 1) + if (num_threads <= 1) num_threads = 4; }