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

Move loadItems out of constructor to avoid race condition #229

Merged
merged 1 commit into from May 24, 2019

Conversation

dwsupplee
Copy link
Contributor

Closes: #225

The flag was added in order to closely simulate the same behavior we had before with loadItems being called in the constructor.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2019
Copy link
Contributor

@jdpedrie jdpedrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should other calls to loadItems() be wrapped in the conditional as well? e.g getItem(), getItems(), hasItem()?

If no, LGTM.

@dwsupplee
Copy link
Contributor Author

I added the conditional so the behavior would match closely with the call to loadItems in the constructor - so I don't believe we want to add it everywhere.

@dwsupplee dwsupplee merged commit 4dd41f9 into googleapis:master May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in SysVCacheItemPool constructor
4 participants