This commit is contained in:
@@ -91,3 +91,9 @@ func (mm *MultiMutex[TKey]) RLocker(key TKey) sync.Locker {
|
||||
lck := mm.mutextMap.GetAndSetIfNotContainsFunc(key, NewCASMutex)
|
||||
return lck.RLocker()
|
||||
}
|
||||
|
||||
// Get returns a Locker interface
|
||||
func (mm *MultiMutex[TKey]) Get(key TKey) sync.Locker {
|
||||
lck := mm.mutextMap.GetAndSetIfNotContainsFunc(key, NewCASMutex)
|
||||
return lck
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user