From 90e9a8e42cdb134e742e7c35104476396d39604a Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Tue, 9 May 2023 11:41:53 -0400 Subject: [PATCH] use delete --- mutex_debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mutex_debug.go b/mutex_debug.go index c692cb8..60aeb3f 100644 --- a/mutex_debug.go +++ b/mutex_debug.go @@ -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() }