Add doc aliases to std:🧵:available_parallelism
This commit is contained in:
parent
6cc91cb3d8
commit
03fbc160cd
@ -1460,6 +1460,8 @@ fn _assert_both<T: Send + Sync>() {}
|
||||
///
|
||||
/// 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()
|
||||
|
Loading…
Reference in New Issue
Block a user