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

Implement stabilization of #[feature(available_parallelism)] #92632

Merged
merged 1 commit into from
Jan 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions library/std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,6 @@ fn _assert_sync_and_send() {
///
/// ```
/// # #![allow(dead_code)]
/// #![feature(available_parallelism)]
/// use std::{io, thread};
///
/// fn main() -> io::Result<()> {
Expand All @@ -1516,7 +1515,7 @@ fn _assert_sync_and_send() {
#[doc(alias = "available_concurrency")] // Alias for a previous name we gave this API on unstable.
#[doc(alias = "hardware_concurrency")] // Alias for C++ `std::thread::hardware_concurrency`.
#[doc(alias = "num_cpus")] // Alias for a popular ecosystem crate which provides similar functionality.
#[unstable(feature = "available_parallelism", issue = "74479")]
#[stable(feature = "available_parallelism", since = "1.59.0")]
pub fn available_parallelism() -> io::Result<NonZeroUsize> {
imp::available_parallelism()
}
1 change: 0 additions & 1 deletion library/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#![unstable(feature = "test", issue = "50297")]
#![doc(test(attr(deny(warnings))))]
#![feature(nll)]
#![feature(available_parallelism)]
#![feature(bench_black_box)]
#![feature(internal_output_capture)]
#![feature(staged_api)]
Expand Down