dgraph-io / ristretto

A high performance memory-bound Go cache
https://dgraph.io/blog/post/introducing-ristretto-high-perf-go-cache/
Apache License 2.0
5.54k stars 364 forks source link

fix: race in close #384

Closed StarpTech closed 1 month ago

StarpTech commented 2 months ago

Related: https://github.com/dgraph-io/ristretto/pull/294

Fixes: https://github.com/dgraph-io/ristretto/issues/377

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

mangalaman93 commented 1 month ago

Hi @StarpTech, Thanks for the PR. Apologies for the delay. Would it be possible for you to explain/use the sync/atomic package instead?

StarpTech commented 1 month ago

@mangalaman93 no opinion on it. I copied the code from the previous contribution. I can also use the std library.

mangalaman93 commented 1 month ago

Yes, please. Std Library is perfect.

StarpTech commented 1 month ago

I already used it but I did not tidy. Please recheck.