-
Notifications
You must be signed in to change notification settings - Fork 13.3k
RFC: Task-local RNG #3439
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
Comments
I think an API to get random numbers without a rng context makes sense. Most callers probably just want a random number and don't care about how it's seeded. |
+1. This would make fuzzing & quickcheck much more pleasant. |
+1. Also good to make it task-local to avoid locking the state. |
Agreed. Minor addition to the rand lib, not RFC-necessary. Un-tagging. |
dbp
pushed a commit
to dbp/rust
that referenced
this issue
Oct 2, 2012
brson
pushed a commit
that referenced
this issue
Oct 2, 2012
Looks like this is done as of c7354e6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we may want each task to have a basic lazily-initialized RNG in local storage. Passing RNGs around to every function that needs random numbers is a chore.
The text was updated successfully, but these errors were encountered: