MCPcopy Create free account
hub / github.com/PostHog/duckgres / beginCleanup

Method beginCleanup

controlplane/session_lifecycle.go:52–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51 var once sync.Once
52 closed := false
53 finish := func() bool {
54 once.Do(func() {
55 l.mu.Lock()
56 closed = l.closed
57 delete(l.cancels, id)
58 l.active--
59 l.cond.Broadcast()
60 l.mu.Unlock()
61 cancel()
62 })
63 return closed
64 }
65 return ctx, finish, nil
66}
67
68func (l *sessionLifecycle) beginCleanup() func() {
69 l.mu.Lock()

Callers 2

DestroySessionMethod · 0.80
OnWorkerCrashMethod · 0.80

Calls 1

DoMethod · 0.80

Tested by

no test coverage detected