mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Use config threads if lower than detected threads
This commit is contained in:
parent
810880c71b
commit
a688bd6da3
@ -246,7 +246,7 @@ final class Psalm
|
||||
$options['long-progress'] = true;
|
||||
}
|
||||
|
||||
$threads = self::useThreads($options, $config, $in_ci);
|
||||
$threads = self::useThreads($options, $config, $in_ci, $config);
|
||||
|
||||
self::emitMacPcreWarning($options, $threads);
|
||||
|
||||
@ -1183,4 +1183,14 @@ final class Psalm
|
||||
|
||||
return $threads;
|
||||
}
|
||||
|
||||
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…
Reference in New Issue
Block a user