Skip to content

Commit 6365bc3

Browse files
authored
feat: Use the available CPUs (#299)
1 parent ee1513a commit 6365bc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"require": {
1717
"php": "^8.1",
18-
"fidry/cpu-core-counter": "^0.5.0 || ^1.0",
18+
"fidry/cpu-core-counter": "^1.2",
1919
"nikic/iter": "^2.2",
2020
"psr/log": "^1.1 || ^2.0 || ^3.0",
2121
"symfony/console": "^6.4.15 || ^7.2",

src/Process/CpuCoreCounter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function getNumberOfCpuCores(): int
4646
}
4747

4848
try {
49-
self::$count = (new FidryCpuCoreCounter())->getCount();
49+
self::$count = (new FidryCpuCoreCounter())->getAvailableForParallelisation()->availableCpus;
5050
} catch (NumberOfCpuCoreNotFound) {
5151
self::$count = 1;
5252
}

0 commit comments

Comments
 (0)