MCPcopy Index your code
hub / github.com/aceld/zinx / Remove

Method Remove

zutils/shard_lock_map.go:141–146  ·  view source on GitHub ↗

Remove removes an element from the map.

(key string)

Source from the content-addressed store, hash-verified

139
140// Remove removes an element from the map.
141func (slm ShardLockMaps) Remove(key string) {
142 shard := slm.GetShard(key)
143 shard.Lock()
144 delete(shard.items, key)
145 shard.Unlock()
146}
147
148// RemoveCb is a callback executed in a map.RemoveCb() call, while Lock is held
149// If returns true, the element will be removed from the map

Callers 2

TestRemoveFunction · 0.95
ClearMethod · 0.95

Calls 1

GetShardMethod · 0.95

Tested by 1

TestRemoveFunction · 0.76