Skip to content

Commit

Permalink
Merge #937
Browse files Browse the repository at this point in the history
937: Use std:: thread:: available_parallelism() instead of num_cpus dependency r=cuviper a=andrewdavidmackenzie

From rust 1.59 we have a call for available_parallelism() in the std library and we can remove the dependency on num_cpu.

Open questions for maintainers:
- what is the minimum version of rust that you want to support
- what is the best default value when the call to get parallelism fails? I chose "1".

Co-authored-by: Andrew Mackenzie <andrew@mackenzie-serres.net>
Co-authored-by: Josh Stone <cuviper@gmail.com>
  • Loading branch information
3 people authored Sep 18, 2023
2 parents 2a342a6 + c7d335c commit 43868a3
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 78 deletions.
123 changes: 53 additions & 70 deletions ci/compat-Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion rayon-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ categories = ["concurrency"]

# Some dependencies may not be their latest version, in order to support older rustc.
[dependencies]
num_cpus = "1.2"
crossbeam-channel = "0.5.0"
crossbeam-deque = "0.8.1"
crossbeam-utils = "0.8.0"
Expand Down
Loading

0 comments on commit 43868a3

Please sign in to comment.