diff options
| author | The8472 <git@infinite-source.de> | 2021-10-23 13:01:07 +0200 |
|---|---|---|
| committer | The8472 <git@infinite-source.de> | 2021-10-23 13:01:07 +0200 |
| commit | fd25491807f1a2d8314dca14dfb01f224d6df093 (patch) | |
| tree | 6021862d280c1c668b1faed598b73e41eed8934e /library/std/src/thread | |
| parent | cf708558b758f4473c4f35986d9492ace7bf906d (diff) | |
| download | rust-fd25491807f1a2d8314dca14dfb01f224d6df093.tar.gz rust-fd25491807f1a2d8314dca14dfb01f224d6df093.zip | |
Add caveat about changing parallelism and function call overhead
Diffstat (limited to 'library/std/src/thread')
| -rw-r--r-- | library/std/src/thread/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index b2aa500a0fd..1a5cf5ab822 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -1449,6 +1449,10 @@ fn _assert_sync_and_send() { /// global state in order to more accurately query the amount of available /// parallelism. /// +/// Resource limits can be changed during the runtime of a program, therefore the value is +/// not cached and instead recomputed every time this function is called. It should not be +/// called from hot code. +/// /// The value returned by this function should be considered a simplified /// approximation of the actual amount of parallelism available at any given /// time. To get a more detailed or precise overview of the amount of |
