mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
iter
This commit is contained in:
@ -49,6 +49,13 @@ func (m *rw_map[K, V]) Count() int {
|
||||
return m.m.Count()
|
||||
}
|
||||
|
||||
func (m *rw_map[K, V]) Iter() <-chan *Entry[K, V] {
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
|
||||
return m.m.Iter()
|
||||
}
|
||||
|
||||
func (m *rw_map[K, V]) ForEach(f func(K, V)) {
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
|
Reference in New Issue
Block a user