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

[Minor] Use std::thread::available_parallelism instead of num_cpus #13579

Merged
merged 6 commits into from
Nov 28, 2024

Conversation

Dandandan
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

Removes num_cpus to reduce number of dependencies.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@Dandandan Dandandan changed the title [Minor] Use std::thread::available_parallelism [Minor] Use std::thread::available_parallelism instead of num_cpus Nov 27, 2024
@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) common Related to common crate labels Nov 27, 2024
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks @Dandandan
Wondering should we factor out the

available_parallelism()
             .unwrap_or(NonZero::new(1).unwrap())
             .get()

into separate concise method?

@Dandandan Dandandan merged commit 5818732 into apache:main Nov 28, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to common crate core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants