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

Is thread-safe concurrent by default? #41

Closed
wenweih opened this issue Apr 29, 2021 · 1 comment
Closed

Is thread-safe concurrent by default? #41

wenweih opened this issue Apr 29, 2021 · 1 comment

Comments

@wenweih
Copy link

wenweih commented Apr 29, 2021

Hi, thanks for the contribution.
May I have a question that InsertUnique is concurrency safe? Thanks for looking.

I had met this data race issue:

==================
WARNING: DATA RACE
Read at 0x00c0b79cac1c by goroutine 276:
  github.com/seiflotfy/cuckoofilter.(*bucket).getFingerprintIndex()
      /Users/wenwei/work/go/src/github.com/balabalabala/vendor/github.com/seiflotfy/cuckoofilter/bucket.go:33 +0x54
  github.com/seiflotfy/cuckoofilter.(*Filter).Lookup()
      /Users/wenwei/work/go/src/github.com/balabala/vendor/github.com/seiflotfy/cuckoofilter/cuckoofilter.go:37 +0xde
  github.com/seiflotfy/cuckoofilter.(*Filter).InsertUnique()
      /Users/wenwei/work/go/src/github.com/balabalavendor/github.com/seiflotfy/cuckoofilter/cuckoofilter.go:74 +0x5a
@wenweih
Copy link
Author

wenweih commented Apr 29, 2021

Saw this discussion #18

@wenweih wenweih closed this as completed May 6, 2021
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