Skip to content

Conversation

@zchee
Copy link
Contributor

@zchee zchee commented Dec 11, 2022

rand.Seed will affect globally. Remove it, and implements mutex locked rand.Rand similar of stdlib.

@sethvargo
Copy link
Owner

What's the reason for the mutex?

@zchee
Copy link
Contributor Author

zchee commented Dec 12, 2022

@zchee
Copy link
Contributor Author

zchee commented Dec 12, 2022

Q: Should I use a global variable similar to stdlib globalRand?


implemented

@zchee zchee force-pushed the avoid-global-seed branch 4 times, most recently from d6236a4 to dc94ec5 Compare December 12, 2022 04:32
Signed-off-by: Koichi Shiraishi <[email protected]>
@zchee zchee force-pushed the avoid-global-seed branch from dc94ec5 to 0c1804f Compare December 12, 2022 04:33
- lockedSource struct with 16 pointer bytes could be 8

Signed-off-by: Koichi Shiraishi <[email protected]>
@zchee
Copy link
Contributor Author

zchee commented Dec 14, 2022

@sethvargo PTAL

@zchee zchee requested a review from sethvargo December 14, 2022 13:03
@sethvargo sethvargo merged commit 9eb639b into sethvargo:main Dec 14, 2022
@zchee zchee deleted the avoid-global-seed branch December 14, 2022 13:47
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

Successfully merging this pull request may close these issues.

2 participants