Skip to content

Commit

Permalink
Add caveat about changing parallelism and function call overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
the8472 committed Oct 23, 2021
1 parent cf70855 commit fd25491
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/std/src/thread/mod.rs
Expand Up @@ -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
Expand Down

0 comments on commit fd25491

Please sign in to comment.