1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
This commit is contained in:
2022-05-12 11:32:03 +08:00
parent 7930a64e59
commit 08309e4a49
7 changed files with 85 additions and 37 deletions

View File

@ -36,8 +36,8 @@ func (m *rw_map[K, V]) Get(key K) (V, bool) {
}
func (m *rw_map[K, V]) Delete(key K) {
m.mu.RLock()
defer m.mu.RUnlock()
m.mu.Lock()
defer m.mu.Unlock()
m.m.Delete(key)
}