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