mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 20:29:48 -04:00
fix(decaymap): invert locking process for Delete
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
acee62a9d0
commit
ddb7b0e99e
@ -61,9 +61,9 @@ func (m *Impl[K, V]) Delete(key K) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
m.lock.Unlock()
|
||||
delete(m.data, key)
|
||||
m.lock.Lock()
|
||||
delete(m.data, key)
|
||||
m.lock.Unlock()
|
||||
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user