Skip to content

Commit edc9f4d

Browse files
authored
Perform thread check and set as early as possible (#3314)
* Perform thread check and set as early as possible
1 parent 810197c commit edc9f4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ int main(string[] cliArgs) {
194194
// Update the current runtime application configuration (default or 'config' file read in options) from any passed in command line arguments
195195
appConfig.updateFromArgs(cliArgs);
196196

197+
// Set the default thread pool value based on configuration or maximum logical CPUs
198+
setDefaultApplicationThreads();
199+
197200
// If --debug-https has been used, set the applicable flag
198201
debugHTTPSResponse = appConfig.getValueBool("debug_https"); // set __gshared bool debugHTTPSResponse in log.d now that we have read-in any CLI arguments
199202

@@ -835,9 +838,6 @@ int main(string[] cliArgs) {
835838
// Do we need to validate the runtimeSyncDirectory to check for the presence of a '.nosync' file
836839
checkForNoMountScenario();
837840

838-
// Set the default thread pool value
839-
setDefaultApplicationThreads();
840-
841841
// Is the sync engine initialised correctly?
842842
if (appConfig.syncEngineWasInitialised) {
843843
// Configure some initial variables

0 commit comments

Comments
 (0)