Skip to content
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

Update thread count calculation method in worker_threads example #1268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikwen
Copy link
Contributor

@nikwen nikwen commented Sep 27, 2024

The Node.js documentation states that os.cpus() should not be used to calculate the amount of threads an app should launch because CPU information might be unavailable (source).

In Node.js v19.4.0 and v18.14.0, os.availableParallelism() was added for that purpose.

The Node.js documentation states that `os.cpus()` should not be used to calculate the amount of threads an app should launch because CPU information might be unavailable.

In Node.js v19.4.0 and v18.14.0, `os.availableParallelism()` was added for that purpose.
@nikwen nikwen requested a review from JoshuaWise as a code owner September 27, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant