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

Use std::thread::available_parallelism instead of num_cpus #525

Closed
liurenjie1024 opened this issue Aug 7, 2024 · 2 comments · Fixed by #526
Closed

Use std::thread::available_parallelism instead of num_cpus #525

liurenjie1024 opened this issue Aug 7, 2024 · 2 comments · Fixed by #526
Assignees
Labels
enhancement New feature or request

Comments

@liurenjie1024
Copy link
Contributor

          Not a reivew comment, just a glimpse of this PR, we can replace this with `std::thread::available_parallelism()`, `num_cpus` is almost unmaintained (as it no longer needs to), and has issues that are solved by the std counterpart, e.g., this one: [std::thread::available_parallelism() return 0](https://github.com/rust-lang/rust/issues/115868).

Originally posted by @SteveLauC in #373 (comment)

@liurenjie1024 liurenjie1024 added the enhancement New feature or request label Aug 7, 2024
@SteveLauC
Copy link
Contributor

Let me take this, looks pretty straightforward:)

@liurenjie1024
Copy link
Contributor Author

Let me take this, looks pretty straightforward:)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants