mirror of https://github.com/Icinga/icinga2.git
Configuration.Concurrency: default to 1 until Configuration freeze
not to start many threads before the user could override their amount (-D).
This commit is contained in:
parent
8fb5d53118
commit
32eb1680f7
|
@ -447,6 +447,10 @@ static int Main()
|
|||
|
||||
Configuration::SetReadOnly(true);
|
||||
|
||||
if (!Configuration::ConcurrencyWasModified) {
|
||||
Configuration::Concurrency = std::thread::hardware_concurrency();
|
||||
}
|
||||
|
||||
/* Ensure that all defined constants work in the way we expect them. */
|
||||
HandleLegacyDefines();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ String Configuration::ApiBindHost;
|
|||
String Configuration::ApiBindPort{"5665"};
|
||||
bool Configuration::AttachDebugger{false};
|
||||
String Configuration::CacheDir;
|
||||
int Configuration::Concurrency{static_cast<int>(std::thread::hardware_concurrency())};
|
||||
int Configuration::Concurrency{1};
|
||||
bool Configuration::ConcurrencyWasModified{false};
|
||||
String Configuration::ConfigDir;
|
||||
String Configuration::DataDir;
|
||||
|
|
Loading…
Reference in New Issue