You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I accidentally found this concurrent-map repository, which looks very cool!
Me and one of my team members suggested how to use custom SHARD_COUNT for each concurrent map instance instead of global SHARD_COUNT.
It looks like this one.
// A "thread" safe map of type string:Anything.// To avoid lock bottlenecks this map is dived to several (SHARD_COUNT) map shards.typeConcurrentMap[Kcomparable, Vany] struct {
shards []*ConcurrentMapShared[K, V]
shardingfunc(keyK) uint32shardCountuint32// <- THIS IS ADDED
}
I'll submit my source code for it on PR, could you please review my changes?
Thanks!