feat(sys): add sys_available_parallelism - #1184
Merged
Merged
Conversation
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Contributor
|
Why is this name more useful? I like the naming from num_cpus. |
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. |
Contributor
|
Ok. At this stage we should not remove the old interface. Just to support num_cpus. |
stlankes
approved these changes
May 14, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We could deprecate
sys_get_processor_countin favor ofsys_available_parallelism.