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

feat(sys): add sys_available_parallelism #1184

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

mkroening
Copy link
Member

We could deprecate sys_get_processor_count in favor of sys_available_parallelism.

@stlankes
Copy link
Contributor

Why is this name more useful? I like the naming from num_cpus.

@mkroening
Copy link
Member Author

I don't feel strong on this, but the reasoning behind Rust naming it like this (rust-lang/rust#74479 (comment), rust-lang/rust#89324) makes sense to me:

For the user, it is important to know how many threads they can spawn to make use of the available concurrency of the system. It is not relevant to how many physical CPU cores or hyperthreads or hardware threads this maps.

@stlankes
Copy link
Contributor

Ok. At this stage we should not remove the old interface. Just to support num_cpus.

@stlankes stlankes added this pull request to the merge queue May 14, 2024
Merged via the queue into main with commit 56b1ac7 May 14, 2024
13 checks passed
@mkroening mkroening deleted the sys_available_parallelism branch May 14, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants