-
Notifications
You must be signed in to change notification settings - Fork 74
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
Inserting to cache is not thread-safe #19
Comments
@tamasd , I had submitted |
Closed, fixed in Release 1.2.1. |
Sorry for the late answer. Unfortunately, I still get this issue with 1.2.1. I get data race errors from tests and invalid results. |
groupcache/lru#Get needs to manipulate its list to track recently used item. So remove |
fixed in v1.2.2 |
My tests have passed, the bug looks fixed. Thanks! |
I have an application that processes HTML files, heavily parallelized.
I often get panics because the LRU cache tries to add entries to a map at the same time. The offending line is this one: https://github.com/antchfx/htmlquery/blob/master/cache.go#L37
Guarding this with a mutex would solve my issue.
The text was updated successfully, but these errors were encountered: