Skip to content

Commit e18abbf

Browse files
committed
update available_parallelism docs since cgroups and sched_getaffinity are now taken into account
1 parent af6d2ed commit e18abbf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/thread/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,10 @@ fn _assert_sync_and_send() {
15241524
///
15251525
/// On Linux:
15261526
/// - It may overcount the amount of parallelism available when limited by a
1527-
/// process-wide affinity mask, or when affected by cgroup limits.
1527+
/// process-wide affinity mask or cgroup quotas and cgroup2 fs or `sched_getaffinity()` can't be
1528+
/// queried, e.g. due to sandboxing.
1529+
/// - It may undercount the amount of parallelism if the current thread's affinity mask
1530+
/// does not reflect the process' cpuset, e.g. due to pinned threads.
15281531
///
15291532
/// On all targets:
15301533
/// - It may overcount the amount of parallelism available when running in a VM

0 commit comments

Comments
 (0)