mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-11 23:33:57 +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() {
|
||||
m := threadLocal.Get().(map[mutexKey]bool)
|
||||
m[s.mutexKey] = false
|
||||
delete(m, s.mutexKey)
|
||||
s.RWMutex.Unlock()
|
||||
}
|
||||
|
||||
@ -73,6 +73,6 @@ func (s *syncRWMutex) RLock() {
|
||||
|
||||
func (s *syncRWMutex) RUnlock() {
|
||||
m := threadLocal.Get().(map[mutexKey]bool)
|
||||
m[s.mutexKey] = false
|
||||
delete(m, s.mutexKey)
|
||||
s.RWMutex.RUnlock()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user