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
ZYunH opened this issue Oct 17, 2019 · 2 comments
Closed

proposal: math/rand: add NewLockedSource #34947

ZYunH opened this issue Oct 17, 2019 · 2 comments

Comments

@ZYunH
Copy link
Contributor

@ZYunH ZYunH commented Oct 17, 2019

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.

@ZYunH
Copy link
Contributor Author

@ZYunH ZYunH commented Oct 17, 2019

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

@ZYunH ZYunH changed the title math/rand: add NewLockedSource proposal : math/rand: add NewLockedSource Oct 17, 2019
@ZYunH ZYunH 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
@gopherbot gopherbot added the Proposal label Oct 17, 2019
@josharian
Copy link
Contributor

@josharian josharian commented Oct 17, 2019

This is a duplicate of #24121.

@josharian josharian closed this Oct 17, 2019
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.