mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-20 12:14:44 +02:00
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);
|
Configuration::SetReadOnly(true);
|
||||||
|
|
||||||
|
if (!Configuration::ConcurrencyWasModified) {
|
||||||
|
Configuration::Concurrency = std::thread::hardware_concurrency();
|
||||||
|
}
|
||||||
|
|
||||||
/* Ensure that all defined constants work in the way we expect them. */
|
/* Ensure that all defined constants work in the way we expect them. */
|
||||||
HandleLegacyDefines();
|
HandleLegacyDefines();
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ String Configuration::ApiBindHost;
|
|||||||
String Configuration::ApiBindPort{"5665"};
|
String Configuration::ApiBindPort{"5665"};
|
||||||
bool Configuration::AttachDebugger{false};
|
bool Configuration::AttachDebugger{false};
|
||||||
String Configuration::CacheDir;
|
String Configuration::CacheDir;
|
||||||
int Configuration::Concurrency{static_cast<int>(std::thread::hardware_concurrency())};
|
int Configuration::Concurrency{1};
|
||||||
bool Configuration::ConcurrencyWasModified{false};
|
bool Configuration::ConcurrencyWasModified{false};
|
||||||
String Configuration::ConfigDir;
|
String Configuration::ConfigDir;
|
||||||
String Configuration::DataDir;
|
String Configuration::DataDir;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user