Rename std:🧵:available_onccurrency
to std:🧵:available_parallelism
This commit is contained in:
parent
83f147b3ba
commit
6cc91cb3d8
11 changed files with 16 additions and 16 deletions
|
@ -1455,12 +1455,12 @@ fn _assert_sync_and_send() {
|
|||
///
|
||||
/// ```
|
||||
/// # #![allow(dead_code)]
|
||||
/// #![feature(available_concurrency)]
|
||||
/// #![feature(available_parallelism)]
|
||||
/// use std::thread;
|
||||
///
|
||||
/// let count = thread::available_concurrency().map(|n| n.get()).unwrap_or(1);
|
||||
/// let count = thread::available_parallelism().map(|n| n.get()).unwrap_or(1);
|
||||
/// ```
|
||||
#[unstable(feature = "available_concurrency", issue = "74479")]
|
||||
pub fn available_concurrency() -> io::Result<NonZeroUsize> {
|
||||
imp::available_concurrency()
|
||||
#[unstable(feature = "available_parallelism", issue = "74479")]
|
||||
pub fn available_parallelism() -> io::Result<NonZeroUsize> {
|
||||
imp::available_parallelism()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue