Skip to content

Commit

Permalink
Add doc aliases to std::thread::available_parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Oct 4, 2021
1 parent 6cc91cb commit 03fbc16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,8 @@ fn _assert_sync_and_send() {
///
/// let count = thread::available_parallelism().map(|n| n.get()).unwrap_or(1);
/// ```
#[doc(alias = "hardware_concurrency")] // Alias for C++ `std::thread::hardware_concurrency`.
#[doc(alias = "available_concurrency")] // Alias for a name we gave this API on unstable.
#[unstable(feature = "available_parallelism", issue = "74479")]
pub fn available_parallelism() -> io::Result<NonZeroUsize> {
imp::available_parallelism()
Expand Down

0 comments on commit 03fbc16

Please sign in to comment.