MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Get

Method Get

internal/utils/sync/map_int.go:72–78  ·  view source on GitHub ↗
(k K)

Source from the content-addressed store, hash-verified

70}
71
72func (this *IntMap[K, V]) Get(k K) (value V) {
73 var index = this.index(k)
74 this.lockers[index].RLock()
75 value = this.m[index][k]
76 this.lockers[index].RUnlock()
77 return
78}
79
80func (this *IntMap[K, V]) GetOk(k K) (value V, ok bool) {
81 var index = this.index(k)

Calls 3

indexMethod · 0.95
RLockMethod · 0.80
RUnlockMethod · 0.80