Repository navigation
gh-118392: Add note about random.random for multi thread app #118396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -294,6 +294,10 @@ be found in any statistics text. | |
|
|
||
| Return the next random floating point number in the range ``0.0 <= X < 1.0`` | ||
|
|
||
| .. warning:: | ||
| Calling this function in the concurrent use can cause performance degradation. | ||
| Instead, Consider using :class:`Random` per thread. | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's move this up to the module level, perhaps between the security warning and the "see also". The advice is not limited this function. I think maybe a For the text, something like:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. This replaces my comment. |
||
|
|
||
| .. function:: uniform(a, b) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.