summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_router.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-07-05 22:53:29 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-07-05 22:53:29 +0300
commit4ed0a15cd03947390f2ffac91f230d9067e23b13 (patch)
treed3591671e6a3c391d524bd7b75eafa0a36a0e40f /src/nxt_router.c
parent842aa9ab46ec5e065ac55b1d186ef9ea81c14af4 (diff)
downloadunit-4ed0a15cd03947390f2ffac91f230d9067e23b13.tar.gz
unit-4ed0a15cd03947390f2ffac91f230d9067e23b13.tar.bz2
By default a number of router worker threads is set to a number
of CPUs.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r--src/nxt_router.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 6e9bb994..c1a33994 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -305,6 +305,10 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
return NXT_ERROR;
}
+ if (tmcf->conf->threads == 0) {
+ tmcf->conf->threads = nxt_ncpu;
+ }
+
http = nxt_conf_get_path(conf, &http_path);
if (http == NULL) {