mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
Add doc aliases to std:🧵:available_parallelism
This commit is contained in:
parent
6cc91cb3d8
commit
03fbc160cd
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user