mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-09-07 22:21:44 +00:00
update control over parallelism
The SWUPD_NUM_THREADS env variable is now understood by all three commands and overrides the default number of threads. Setting it to 1 is useful while debugging the code that runs inside threads (only one thread hits breakpoints there). If SWUPD_NUM_THREADS is invalid, a warning is printed and the variable gets ignored, i.e. the default parallelism is used. The hard-coded parallelism of 12 threads when analysing the file system gets replaced with n, where n is the number of available CPUs. The default is the same as before elsewhere (n for packing, 3 * n for fullfiles). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
This commit is contained in:
@@ -257,5 +257,6 @@ extern int system_argv(char *const argv[]);
|
||||
extern int system_argv_fd(char *const argv[], int newstdin, int newstdout, int newstderr);
|
||||
extern int system_argv_pipe(char *const argvp1[], int stdinp1, int stderrp1,
|
||||
char *const argvp2[], int stdoutp2, int stderrp2);
|
||||
extern int num_threads(float scaling);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user