Other: Fix send with plus address

This commit is contained in:
James Houlahan
2022-10-11 23:24:20 +02:00
parent 1c922ca083
commit da1ee99c53
8 changed files with 206 additions and 199 deletions

View File

@ -64,6 +64,13 @@ func (m *Map[Key, Val]) Set(key Key, val Val) {
m.data[key] = val
}
func (m *Map[Key, Val]) Delete(key Key) {
m.lock.Lock()
defer m.lock.Unlock()
delete(m.data, key)
}
func (m *Map[Key, Val]) Iter(fn func(key Key, val Val)) {
m.lock.RLock()
defer m.lock.RUnlock()