Document always returning at least 1 core (#106)

This commit is contained in:
daxpedda
2021-03-16 21:02:00 +01:00
committed by GitHub
parent 8f4ee14045
commit c7ebcc60ce
+4
View File
@@ -47,6 +47,8 @@ use linux::{get_num_cpus, get_num_physical_cpus};
/// This function will get the number of logical cores. Sometimes this is different from the number
/// of physical cores (See [Simultaneous multithreading on Wikipedia][smt]).
///
/// This will always return at least `1`.
///
/// # Examples
///
/// ```
@@ -75,6 +77,8 @@ pub fn get() -> usize {
/// Returns the number of physical cores of the current system.
///
/// This will always return at least `1`.
///
/// # Note
///
/// Physical count is supported only on Linux, mac OS and Windows platforms.