aboutsummaryrefslogtreecommitdiff
path: root/src/core/taskq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/taskq.c')
-rw-r--r--src/core/taskq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/taskq.c b/src/core/taskq.c
index 9dde6981..12a986b1 100644
--- a/src/core/taskq.c
+++ b/src/core/taskq.c
@@ -266,10 +266,14 @@ nni_taskq_sys_init(void)
{
int nthrs;
+#ifndef NNG_NUM_TASKQ_THREADS
nthrs = nni_plat_ncpu() * 2;
if (nthrs < 2) {
nthrs = 2;
}
+#else
+ nthrs = NNG_NUM_TASKQ_THREADS;
+#endif
return (nni_taskq_init(&nni_taskq_systq, nthrs));
}