mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
ha: update godoc on grabLockOrStop (#10547)
This commit is contained in:
parent
0bc11e89c6
commit
30eeac6501
1 changed files with 3 additions and 1 deletions
|
|
@ -637,7 +637,9 @@ func (c *Core) waitForLeadership(newLeaderCh chan func(), manualStepDownCh, stop
|
|||
|
||||
// grabLockOrStop returns stopped=false if the lock is acquired. Returns
|
||||
// stopped=true if the lock is not acquired, because stopCh was closed. If the
|
||||
// lock was acquired (stopped=false) then it's up to the caller to unlock.
|
||||
// lock was acquired (stopped=false) then it's up to the caller to unlock. If
|
||||
// the lock was not acquired (stopped=true), the caller does not hold the lock and
|
||||
// should not call unlock.
|
||||
func grabLockOrStop(lockFunc, unlockFunc func(), stopCh chan struct{}) (stopped bool) {
|
||||
// lock protects these variables which are shared by parent and child.
|
||||
var lock sync.Mutex
|
||||
|
|
|
|||
Loading…
Reference in a new issue