| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| .. warning:: | ||
| Calling this function in the concurrent use can cause performance degradation. | ||
| Instead, Consider using :class:`Random` per thread. | ||
|
|
There was a problem hiding this comment.
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 .. note:: is more appropriate. A red "warning" seems a bit severe to me.
For the text, something like:
The global random number generator and instances of :class:`Random` are thread-safe. However, in the free-threaded build, concurrent calls to the global generator or to the same instance of :class:`Random` may encounter contention and poor performance. Consider using separate instances of :class:`Random` per thread instead.
Sorry, something went wrong.
There was a problem hiding this comment.
I agree. This replaces my comment.
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: I have made the requested changes; please review again. |
Sorry, something went wrong.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @terryjreedy: please review the changes made to this pull request. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--118396.org.readthedocs.build/