MCPcopy Index your code
hub / github.com/coder/coder / trackGoroutine

Method trackGoroutine

agent/agent.go:1709–1721  ·  view source on GitHub ↗
(fn func())

Source from the content-addressed store, hash-verified

1707}
1708
1709func (a *agent) trackGoroutine(fn func()) error {
1710 a.closeMutex.Lock()
1711 defer a.closeMutex.Unlock()
1712 if a.closing {
1713 return xerrors.Errorf("track conn goroutine: %w", ErrAgentClosing)
1714 }
1715 a.closeWaitGroup.Add(1)
1716 go func() {
1717 defer a.closeWaitGroup.Done()
1718 fn()
1719 }()
1720 return nil
1721}
1722
1723func (a *agent) createTailnet(
1724 ctx context.Context,

Callers 2

handleManifestMethod · 0.95
createTailnetMethod · 0.95

Calls 5

AddMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45
ErrorfMethod · 0.45
DoneMethod · 0.45

Tested by

no test coverage detected