MCPcopy Create free account
hub / github.com/Super-long/ChubbyGo / BaseGet

Method BaseGet

BaseServer/concurrentHashMap.go:360–368  ·  view source on GitHub ↗
(k string)

Source from the content-addressed store, hash-verified

358}
359
360func (myMap *BaseMap) BaseGet(k string) interface{} {
361 myMap.Lock()
362 defer myMap.Unlock()
363 if v, ok := myMap.m[k]; !ok {
364 return -1
365 } else {
366 return v
367 }
368}
369
370func (myMap *BaseMap) BaseDelete(k string) {
371 myMap.Lock()

Callers 2

BenchmarkGetKey_BaseMapFunction · 0.95
BenchmarkPutGet_BaseMapFunction · 0.95

Calls

no outgoing calls

Tested by 2

BenchmarkGetKey_BaseMapFunction · 0.76
BenchmarkPutGet_BaseMapFunction · 0.76