mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-12 05:33:58 +01:00
use delete
This commit is contained in:
parent
9105eba939
commit
90e9a8e42c
@ -60,7 +60,7 @@ func (s *syncRWMutex) Lock() {
|
|||||||
|
|
||||||
func (s *syncRWMutex) Unlock() {
|
func (s *syncRWMutex) Unlock() {
|
||||||
m := threadLocal.Get().(map[mutexKey]bool)
|
m := threadLocal.Get().(map[mutexKey]bool)
|
||||||
m[s.mutexKey] = false
|
delete(m, s.mutexKey)
|
||||||
s.RWMutex.Unlock()
|
s.RWMutex.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +73,6 @@ func (s *syncRWMutex) RLock() {
|
|||||||
|
|
||||||
func (s *syncRWMutex) RUnlock() {
|
func (s *syncRWMutex) RUnlock() {
|
||||||
m := threadLocal.Get().(map[mutexKey]bool)
|
m := threadLocal.Get().(map[mutexKey]bool)
|
||||||
m[s.mutexKey] = false
|
delete(m, s.mutexKey)
|
||||||
s.RWMutex.RUnlock()
|
s.RWMutex.RUnlock()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user