mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-10 13:17:31 -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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
m.lock.Unlock()
|
|
||||||
delete(m.data, key)
|
|
||||||
m.lock.Lock()
|
m.lock.Lock()
|
||||||
|
delete(m.data, key)
|
||||||
|
m.lock.Unlock()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user