mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-30 18:48:28 +01:00
use delete
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user