1 Star 0 Fork 0

遇见美好/concurrent_map

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
concurrent_map_benchmark_adapter.go 629 Bytes
一键复制 编辑 原始数据 按行查看 历史
遇见美好 提交于 2021-01-15 17:54 +08:00 . one
package concurrent_map
type ConcurrentMapBenchmarkAdapter struct {
cm *ConcurrentMap
}
func (m *ConcurrentMapBenchmarkAdapter) Set(key interface{}, value interface{}) {
m.cm.Set(StrKey(key.(string)), value)
}
func (m *ConcurrentMapBenchmarkAdapter) Get(key interface{}) (interface{}, bool) {
return m.cm.Get(StrKey(key.(string)))
}
func (m *ConcurrentMapBenchmarkAdapter) Del(key interface{}) {
m.cm.Del(StrKey(key.(string)))
}
func CreateConcurrentMapBenchmarkAdapter(numOfPartitions int) *ConcurrentMapBenchmarkAdapter {
conMap := CreateConcurrentMap(numOfPartitions)
return &ConcurrentMapBenchmarkAdapter{conMap}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/meet-you/concurrent_map.git
git@gitee.com:meet-you/concurrent_map.git
meet-you
concurrent_map
concurrent_map
7f6d35a30650

搜索帮助