diff options
-rw-r--r-- | meta/lib/oe/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 7982b2b511..136650e6f7 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -248,9 +248,9 @@ 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 | ||
251 | def cpu_count(at_least=1): | 251 | def cpu_count(at_least=1, at_most=64): |
252 | cpus = len(os.sched_getaffinity(0)) | 252 | cpus = len(os.sched_getaffinity(0)) |
253 | return max(cpus, at_least) | 253 | return max(min(cpus, at_most), at_least) |
254 | 254 | ||
255 | def execute_pre_post_process(d, cmds): | 255 | def execute_pre_post_process(d, cmds): |
256 | if cmds is None: | 256 | if cmds is None: |