about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorThe 8472 <git@infinite-source.de>2022-03-03 00:36:23 +0100
committerThe 8472 <git@infinite-source.de>2022-03-03 00:43:46 +0100
commite18abbf2ac544ef744c5aa95df434b2c81c066a2 (patch)
tree557551c03c51dd2b6fcf7936bc7b98732766ca0c /library/std/src
parentaf6d2ed24557694ff7d32bf2a29a6cd5aaade859 (diff)
downloadrust-e18abbf2ac544ef744c5aa95df434b2c81c066a2.tar.gz
rust-e18abbf2ac544ef744c5aa95df434b2c81c066a2.zip
update available_parallelism docs since cgroups and sched_getaffinity are now taken into account
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/thread/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index beb60609934..09d1e714ab6 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1524,7 +1524,10 @@ fn _assert_sync_and_send() {
 ///
 /// On Linux:
 /// - It may overcount the amount of parallelism available when limited by a
-///   process-wide affinity mask, or when affected by cgroup limits.
+///   process-wide affinity mask or cgroup quotas and cgroup2 fs or `sched_getaffinity()` can't be
+///   queried, e.g. due to sandboxing.
+/// - It may undercount the amount of parallelism if the current thread's affinity mask
+///   does not reflect the process' cpuset, e.g. due to pinned threads.
 ///
 /// On all targets:
 /// - It may overcount the amount of parallelism available when running in a VM