-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel jobs with make #76
Conversation
LGTM :) |
* | ||
* @return positive-int | ||
*/ | ||
public static function determine(): int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend https://github.com/theofidry/cpu-core-counter, its the code used in most tools which have parallelisation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some great packages already used it : see https://packagist.org/packages/fidry/cpu-core-counter/dependents?order_by=downloads
And I hope (me too) to adapt some of my packages to add a parallelization feature
Fixes #73
PIE will try three approaches to determine the number of cores (
nproc --all
,getconf __NPROCESSORS_ONLN
,sysctl -n hw.ncpu
), or you can override with-jN
or--make-parallel-jobs=N
when running with PIE.Doesn't cover Windows; or maybe some uncommon systems without those above commands. Suggestions welcome.