Skip to content

Comments

(misc) Random seed generater does not need to be alive as static thread_local#33

Closed
simnalamburt wants to merge 1 commit intocouchbase:masterfrom
simnalamburt:misc
Closed

(misc) Random seed generater does not need to be alive as static thread_local#33
simnalamburt wants to merge 1 commit intocouchbase:masterfrom
simnalamburt:misc

Conversation

@simnalamburt
Copy link
Contributor

@simnalamburt simnalamburt commented Aug 4, 2018

The std::random_device rd will be used only once at the initialization phase of gen variable. It'll only consume the RAM even if it stays alive as a static thread_local variable.

Reference

@cb-sdk-robot
Copy link

Thanks for the pull request!! To ensure quality review, Couchbase employs a code review system based on Gerrit to manage the workflow of changes in addition to tracking our contributor agreements.

To get this change in and collaborate in code review, please register on Gerrit and accept our CLA. The easiest way to do this is to follow the link below, sign in with your GitHub account and then follow through the steps provided on that page to sign an 'Individual' agreement: http://review.couchbase.org/#/settings/new-agreement.

Keep in mind that the emails we are seeing on the commits are: sim******urt@gma***com

Note: Please contact us if you have any issues registering with Gerrit! If you have not signed our CLA within 7 days, the Pull Request will be automatically closed.

::SDKBOT/PR:no_cla

@simnalamburt
Copy link
Contributor Author

I signed the CLA. Please proceed the code review process.

@avsej
Copy link
Member

avsej commented Aug 6, 2018

@simnalamburt, please submit your patch through gerrit. Github is just a mirror, we don't work with pull requests.

The 'std::random_device rd' will be used only once at the initialization
phase of 'gen' variable. It'll only consume the RAM even if it stays
alive as static thread_local variable.

Reference:
  https://issues.couchbase.com/browse/CCBC-963

Change-Id: I8120b8e62a6ee54b46590daa155e2f93867c0d1f
@cb-sdk-robot
Copy link

Your changes (commit: 0903049) have been pushed to the Couchbase Review Site:
http://review.couchbase.org/97866

::SDKBOT/PR:created

@avsej
Copy link
Member

avsej commented Aug 6, 2018

Fixed in 8d7babf

@avsej avsej closed this Aug 6, 2018
@simnalamburt simnalamburt deleted the misc branch September 4, 2018 15:56
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.

3 participants