Browse Source

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
pull/402/merge
Richard Fuchs 8 years ago
parent
commit
13d51f0df0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      daemon/main.c

+ 2
- 2
daemon/main.c View File

@ -651,9 +651,9 @@ int main(int argc, char **argv) {
if (num_threads < 1) { if (num_threads < 1) {
#ifdef _SC_NPROCESSORS_ONLN #ifdef _SC_NPROCESSORS_ONLN
num_threads = sysconf( _SC_NPROCESSORS_ONLN );
num_threads = sysconf( _SC_NPROCESSORS_ONLN ) + 3;
#endif #endif
if (num_threads < 1)
if (num_threads <= 1)
num_threads = 4; num_threads = 4;
} }


Loading…
Cancel
Save