We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
std::thread::available_parallelism
1 parent 6cc91cb commit 03fbc16Copy full SHA for 03fbc16
library/std/src/thread/mod.rs
@@ -1460,6 +1460,8 @@ fn _assert_sync_and_send() {
1460
///
1461
/// let count = thread::available_parallelism().map(|n| n.get()).unwrap_or(1);
1462
/// ```
1463
+#[doc(alias = "hardware_concurrency")] // Alias for C++ `std::thread::hardware_concurrency`.
1464
+#[doc(alias = "available_concurrency")] // Alias for a name we gave this API on unstable.
1465
#[unstable(feature = "available_parallelism", issue = "74479")]
1466
pub fn available_parallelism() -> io::Result<NonZeroUsize> {
1467
imp::available_parallelism()
0 commit comments