MCPcopy Index your code
hub / github.com/devspace-sh/devspace / Handler

Struct Handler

pkg/util/interrupt/interrupt.go:40–48  ·  view source on GitHub ↗

Handler guarantees execution of notifications after a critical section (the function passed to a Run method), even in the presence of process termination. It guarantees exactly once invocation of the provided notify functions.

Source from the content-addressed store, hash-verified

38// to a Run method), even in the presence of process termination. It guarantees exactly once
39// invocation of the provided notify functions.
40type Handler struct {
41 notifyMutex sync.Mutex
42 notify []notify
43 final func(os.Signal)
44 once sync.Once
45
46 channelMutex sync.Mutex
47 channel chan os.Signal
48}
49
50type notify struct {
51 id string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected