Skip to content

Commit

Permalink
feat: Use the available CPUs (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Dec 6, 2024
1 parent ee1513a commit 6365bc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.1",
"fidry/cpu-core-counter": "^0.5.0 || ^1.0",
"fidry/cpu-core-counter": "^1.2",
"nikic/iter": "^2.2",
"psr/log": "^1.1 || ^2.0 || ^3.0",
"symfony/console": "^6.4.15 || ^7.2",
Expand Down
2 changes: 1 addition & 1 deletion src/Process/CpuCoreCounter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function getNumberOfCpuCores(): int
}

try {
self::$count = (new FidryCpuCoreCounter())->getCount();
self::$count = (new FidryCpuCoreCounter())->getAvailableForParallelisation()->availableCpus;
} catch (NumberOfCpuCoreNotFound) {
self::$count = 1;
}
Expand Down

0 comments on commit 6365bc3

Please sign in to comment.