It's never straightforward to pick an ideal number of processes
for anything and Xapian helper processes are no exception since
there may be a massive disparities in CPU count and I/O
performance. So default to a single worker for now in the C++
version since that's the default is for the Perl/(XS|SWIG)
version, and also the same as for our normal public-facing
daemons.
This keeps the behavior between the Perl+(XS|SWIG) and C++
version as similar as possible.
}
nworker = 1;
-#ifdef _SC_NPROCESSORS_ONLN
- long j = sysconf(_SC_NPROCESSORS_ONLN);
- if (j > 0)
- nworker = j > WORKER_MAX ? WORKER_MAX : j;
-#endif // _SC_NPROCESSORS_ONLN
-
// make warn/warnx/err multi-process friendly:
if (my_setlinebuf(stderr))
err(EXIT_FAILURE, "setlinebuf(stderr)");