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 condition in MemoryCache #34

Open
carterpage opened this issue Jun 2, 2013 · 0 comments
Open

Race condition in MemoryCache #34

carterpage opened this issue Jun 2, 2013 · 0 comments

Comments

@carterpage
Copy link

Size isn't locked. Simultaneous puts will do weird things.

checkSize() or anything else with an iterator will also have undefined behavior.

Safest quick fix is to synchronize on the public methods, not the "cache" object. Shouldn't be all that different speed-wise, except when a cache resize happens.

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