summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r--meta/lib/oe/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index e350b05ddf..aee4336482 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -248,9 +248,10 @@ def trim_version(version, num_parts=2):
248 trimmed = ".".join(parts[:num_parts]) 248 trimmed = ".".join(parts[:num_parts])
249 return trimmed 249 return trimmed
250 250
251def cpu_count(): 251def cpu_count(at_least=1):
252 import multiprocessing 252 import multiprocessing
253 return multiprocessing.cpu_count() 253 cpus = multiprocessing.cpu_count()
254 return max(cpus, at_least)
254 255
255def execute_pre_post_process(d, cmds): 256def execute_pre_post_process(d, cmds):
256 if cmds is None: 257 if cmds is None: