mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
If ns_g_cpus is 0, call isc_os_ncpus() to probe.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <isc/app.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/os.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
@@ -341,6 +342,8 @@ static isc_result_t
|
||||
create_managers(void) {
|
||||
isc_result_t result;
|
||||
|
||||
if (ns_g_cpus == 0)
|
||||
ns_g_cpus = isc_os_ncpus();
|
||||
result = isc_taskmgr_create(ns_g_mctx, ns_g_cpus, 0, &ns_g_taskmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
|
Reference in New Issue
Block a user