fix(locks): access to in-memory locks inside scheduled background tasks are now properly guarded
Some checks failed
/ build (push) Has been cancelled
Some checks failed
/ build (push) Has been cancelled
This commit is contained in:
parent
678da51dc0
commit
59c217b666
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