Perform thread check and set as early as possible (#3314)

* Perform thread check and set as early as possible
This commit is contained in:
abraunegg 2025-06-03 08:36:25 +10:00 committed by GitHub
commit edc9f4d6cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,6 +194,9 @@ int main(string[] cliArgs) {
// Update the current runtime application configuration (default or 'config' file read in options) from any passed in command line arguments
appConfig.updateFromArgs(cliArgs);
// Set the default thread pool value based on configuration or maximum logical CPUs
setDefaultApplicationThreads();
// If --debug-https has been used, set the applicable flag
debugHTTPSResponse = appConfig.getValueBool("debug_https"); // set __gshared bool debugHTTPSResponse in log.d now that we have read-in any CLI arguments
@ -835,9 +838,6 @@ int main(string[] cliArgs) {
// Do we need to validate the runtimeSyncDirectory to check for the presence of a '.nosync' file
checkForNoMountScenario();
// Set the default thread pool value
setDefaultApplicationThreads();
// Is the sync engine initialised correctly?
if (appConfig.syncEngineWasInitialised) {
// Configure some initial variables