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

Race in cache fix #8

Merged
merged 3 commits into from
Jan 26, 2018
Merged

Race in cache fix #8

merged 3 commits into from
Jan 26, 2018

Conversation

rationull
Copy link
Contributor

I noticed that exercise 2 "race-in-cache" doesn't actually write values into the KeyStoreCache.cache map, which means the cache size limiting doesn't work and also eliminates some of the race conditions that should be present.

Was this intentional for some reason? Figured I'd submit the trivial PR in case it's not.

Also added a test case for this exercise that will fail if the race conditions are removed but the cache map or pages list aren't updated correctly.

@loong
Copy link
Owner

loong commented Jan 26, 2018

Hi @rationull. Thanks so much for the PR. I am traveling through Myanmar right now and only have limited access (no laptop with me and bad internet), so can't fully test your PR. However, it looks good to me, so I'll just trust you and merge. =)

@loong loong merged commit 8872b65 into loong:master Jan 26, 2018
@rationull
Copy link
Contributor Author

rationull commented Jan 27, 2018

Thanks @mindworker for publishing this repo with some fun exercises -- happy to help. Best wishes on your travels!

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.

None yet

2 participants