I am trying to implement an LRU cache. Several global lru lists could be accessed concurrently by multiple goroutines, which could be a disaster in a machine with 24 or more cores.
Therefore, it would be great if I can add the item to P-local storage and flush the batched item into the lru list as a whole. This should greatly reduce the contention for the global lru list. How can I do it? I saw some related github issues, #8281 <https://github.com/golang/go/issues/8281> and #21355 <https://github.com/golang/go/issues/21355>, which leads me to a project called gls <https://github.com/jtolds/gls>, but the code seems too much to integrate into my project (actually I'd better not include any third-party package to avoid potential law issues). Is there any built-in way to achieve this? Thanks -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c79d3801-2f03-43fd-8dd8-35904b481341%40googlegroups.com.