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

Method Remove

BaseServer/concurrentHashMap.go:158–164  ·  view source on GitHub ↗

Removes an element from the map.

(key string)

Source from the content-addressed store, hash-verified

156
157// Removes an element from the map.
158func (m ConcurrentHashMap) Remove(key string) {
159 // Try to get shard.
160 shard := m.GetShard(key)
161 shard.Lock()
162 delete(shard.items, key)
163 shard.Unlock()
164}
165
166// Removes an element from the map and returns it
167func (m ConcurrentHashMap) Pop(key string) (v interface{}, exists bool) {

Callers 2

ChubbyGoMapDeleteMethod · 0.80

Calls 1

GetShardMethod · 0.95

Tested by 1