Remove plans/ directory (P0/P1/P2 work complete)
This commit is contained in:
@@ -24,5 +24,8 @@ func GetKeyLock(keyLocks []sync.Map, key string) *sync.RWMutex {
|
||||
shard := &keyLocks[shardIndex]
|
||||
|
||||
keyLock, _ := shard.LoadOrStore(key, &sync.RWMutex{})
|
||||
return keyLock.(*sync.RWMutex)
|
||||
if rl, ok := keyLock.(*sync.RWMutex); ok {
|
||||
return rl
|
||||
}
|
||||
panic("corrupted lock shard: expected *sync.RWMutex")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user