MCPcopy Create free account
hub / github.com/coder/coder / clearOrPend

Method clearOrPend

coderd/provisionerdserver/acquirer.go:369–379  ·  view source on GitHub ↗
(d domain)

Source from the content-addressed store, hash-verified

367}
368
369func (a *Acquirer) clearOrPend(d domain) {
370 a.mu.Lock()
371 defer a.mu.Unlock()
372 if len(d.acquirees) == 0 {
373 // this can happen if the domain is removed right around the time the
374 // backup poll (which calls this function) triggers. Nothing to do
375 // since there are no acquirees.
376 return
377 }
378 a.clearOrPendLocked(d)
379}
380
381func (*Acquirer) clearOrPendLocked(d domain) {
382 // MUST BE CALLED HOLDING THE a.mu LOCK

Callers 1

pollMethod · 0.80

Calls 3

clearOrPendLockedMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected