Skip to content
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

proposal: math/rand: add NewLockedSource #34947

Closed
zhangyunhao116 opened this issue Oct 17, 2019 · 2 comments
Closed

proposal: math/rand: add NewLockedSource #34947

zhangyunhao116 opened this issue Oct 17, 2019 · 2 comments

Comments

@zhangyunhao116
Copy link
Contributor

May be we could add a new API called NewLockedSource in math/rand, unlike NewSource, it is safe for concurrent use by multiple goroutines. This API makes it easy to crate a concurrent-safe *math.Rand like the globalRand in math/rand.

@zhangyunhao116
Copy link
Contributor Author

A pull request here #34876
This is a proposal now.

@zhangyunhao116 zhangyunhao116 changed the title math/rand: add NewLockedSource proposal : math/rand: add NewLockedSource Oct 17, 2019
@zhangyunhao116 zhangyunhao116 changed the title proposal : math/rand: add NewLockedSource proposal: math/rand: add NewLockedSource Oct 17, 2019
@gopherbot gopherbot added this to the Proposal milestone Oct 17, 2019
@josharian
Copy link
Contributor

This is a duplicate of #24121.

@golang golang locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants