mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Use config threads if lower than detected threads
This commit is contained in:
parent
1b8f337748
commit
2fdae4ae16
@ -249,7 +249,7 @@ final class Psalm
|
||||
$options['long-progress'] = true;
|
||||
}
|
||||
|
||||
$threads = self::detectThreads($options, $in_ci);
|
||||
$threads = self::useThreads($options, $in_ci, $config);
|
||||
|
||||
self::emitMacPcreWarning($options, $threads);
|
||||
|
||||
@ -1337,4 +1337,14 @@ final class Psalm
|
||||
|
||||
HELP;
|
||||
}
|
||||
|
||||
private static function useThreads(array $options, bool $in_ci, Config $config): int{
|
||||
$threads = self::detectThreads($options, $in_ci);
|
||||
|
||||
if ($config->threads && $config->threads<$threads) {
|
||||
$threads = $config->threads;
|
||||
}
|
||||
|
||||
return $threads;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user