Skip to content

Use number of available CPUs instead of total number

Marcel Loose requested to merge RAP-689_use-number-of-available-cpus into master

Created a new function nproc() in miscellaneous.py, which returns the number of CPU cores available to the current process, similar to what the Linux nproc command does. This can be less than the total number of CPU cores in the machine, which is returned by, e.g., multiprocessing.cpu_count(). Replaced calls to multiprocessing.cpu_count() with misc.nproc().

Closes RAP-689

Edited by Marcel Loose

Merge request reports

Loading