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

uuid4 does not seem to be thread safe. #18

Closed
y20Lion opened this issue Dec 5, 2017 · 0 comments
Closed

uuid4 does not seem to be thread safe. #18

y20Lion opened this issue Dec 5, 2017 · 0 comments

Comments

@y20Lion
Copy link

y20Lion commented Dec 5, 2017

uuid4() constructor uses a static variable : static std::random_device rd;
I don't think that random_device is guaranteed to be thread safe.
If that's the case, a potential fix could be to add the thread_local qualifier to the variable declaration.

@r-lyeh r-lyeh closed this as completed in 358466a Apr 9, 2022
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

1 participant