Skip to content

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

Closed
pcwalton opened this issue Sep 10, 2012 · 5 comments
Closed

RFC: Task-local RNG #3439

pcwalton opened this issue Sep 10, 2012 · 5 comments

Comments

@pcwalton
Copy link
Contributor

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.

@brson
Copy link
Contributor

brson commented Sep 10, 2012

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.

@jruderman
Copy link
Contributor

+1. This would make fuzzing & quickcheck much more pleasant.

@bblum
Copy link
Contributor

bblum commented Sep 10, 2012

+1. Also good to make it task-local to avoid locking the state.

@graydon
Copy link
Contributor

graydon commented Sep 13, 2012

Agreed. Minor addition to the rand lib, not RFC-necessary. Un-tagging.

@catamorphism
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants