mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
[Command] enables parallel command execution by default
This commit is contained in:
@@ -2107,9 +2107,9 @@
|
||||
"default": false
|
||||
},
|
||||
"parallel": {
|
||||
"description": "Set if the command should be executed in parallel with other commands\nMight improve performance when using multiple commands, but may cause issues with some commands",
|
||||
"description": "Set if the command should be executed in parallel with other commands\nImprove performance when using multiple commands, but may cause issues with some commands",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
"default": true
|
||||
},
|
||||
"key": {
|
||||
"$ref": "#/$defs/key"
|
||||
|
||||
@@ -45,8 +45,8 @@ const char* ffDetectCommand(FFCommandOptions* options, FFstrbuf* result)
|
||||
FFCommandResultBundle bundle = {};
|
||||
if (!options->parallel)
|
||||
bundle.error = spawnProcess(options, &bundle.handle);
|
||||
else
|
||||
ffListShift(&commandQueue, &bundle);
|
||||
else if (!ffListShift(&commandQueue, &bundle))
|
||||
return "[BUG] command queue is empty";
|
||||
|
||||
if (bundle.error)
|
||||
return bundle.error;
|
||||
|
||||
@@ -131,7 +131,7 @@ void ffInitCommandOptions(FFCommandOptions* options)
|
||||
);
|
||||
ffStrbufInit(&options->text);
|
||||
options->useStdErr = false;
|
||||
options->parallel = false;
|
||||
options->parallel = true;
|
||||
}
|
||||
|
||||
void ffDestroyCommandOptions(FFCommandOptions* options)
|
||||
|
||||
Reference in New Issue
Block a user