MCPcopy Create free account
hub / github.com/Azure/peerd / Delete

Method Delete

pkg/cache/syncmap.go:58–62  ·  view source on GitHub ↗

Delete removes the entry with the specified key from the SyncMap. If the key does not exist, this method does nothing.

(key string)

Source from the content-addressed store, hash-verified

56// Delete removes the entry with the specified key from the SyncMap.
57// If the key does not exist, this method does nothing.
58func (sm *SyncMap) Delete(key string) {
59 sm.lock.Lock()
60 defer sm.lock.Unlock()
61 delete(*sm.mapObj, key)
62}
63
64// NewSyncMap creates a new SyncMap with the specified maximum number of entries.
65// If the maximum number of entries is less than or equal to 0, it will be set to 1.

Callers 2

TestSyncMapAddDeleteFunction · 0.95
BenchmarkSyncMapFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestSyncMapAddDeleteFunction · 0.76
BenchmarkSyncMapFunction · 0.76