1
This commit is contained in:
parent
ccfa6c4f99
commit
ad5656a00a
9
sync.go
9
sync.go
@ -57,6 +57,15 @@ func (this *ConcurrentMap[T1, T2]) Range(f func(key T1, value T2) bool) {
|
||||
})
|
||||
}
|
||||
|
||||
func (this *ConcurrentMap[T1, T2]) GetSize() int {
|
||||
var size int
|
||||
this.kvHash.Range(func (key, value interface{}) bool {
|
||||
size += 1
|
||||
return true
|
||||
})
|
||||
return size
|
||||
}
|
||||
|
||||
func (this *ConcurrentMap[T1, T2]) Store(key T1, value T2) {
|
||||
this.kvHash.Store(key, value)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user