fix(locks): access to in-memory locks inside scheduled background tasks are now properly guarded
This commit is contained in:
parent
10bc3a59bb
commit
927bee30cf
1 changed files with 2 additions and 0 deletions
|
@ -63,7 +63,9 @@ func (l *InMemoryLockRegistry) Clear() {
|
|||
|
||||
// Exists exists a lock by name
|
||||
func (l *InMemoryLockRegistry) Exists(name string) bool {
|
||||
l.mu.Lock()
|
||||
_, exists := l.locks[name]
|
||||
l.mu.Unlock()
|
||||
return exists
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue