Skip to content

Conversation

c410-f3r
Copy link
Contributor

@c410-f3r c410-f3r commented Dec 11, 2023

Replaces the num_cpus project with the built-in std::thread::available_parallelism() method to decrease the number of transient dependencies for downstream crates.

Bumping to 1.65 instead of 1.64 to allow the possible inner usage of let_else and GAT.

@Darksonn
Copy link
Contributor

We are not bumping the MSRV just to use the let_else feature.

@Darksonn Darksonn closed this Dec 11, 2023
@c410-f3r
Copy link
Contributor Author

???

The intend of this PR is to remove num_cpus. If let_else or any other language feature is not desired, then the MSRV can be set to 1.64.

@Darksonn
Copy link
Contributor

You named the PR "bump to 1.65", so I assumed that this was the primary change.

@seanmonstar What is the status on the num-cpus crate?

@Darksonn
Copy link
Contributor

then the MSRV can be set to 1.64.

Why does using available_parallelism require an msrv bump at all? As far as I can tell, it's available since 1.59.

@c410-f3r
Copy link
Contributor Author

For Linux machines, 1.63 only makes use of cgroupv2 and such exclusive behavior led to issues like rust-lang/rust#97549.

In 1.64, cgroupv1 is also supported (rust-lang/rust#97925, https://releases.rs/docs/1.64.0/).

@Darksonn
Copy link
Contributor

Okay. Can you open an issue to switch to available_parallelism instead of a PR? If we have to bump the msrv, then I'd like to time it together with the upgrade to mio v1.0.

@c410-f3r
Copy link
Contributor Author

#6211

@Darksonn
Copy link
Contributor

Can you add the information about the msrv requirement in the issue? Thank you!

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