MCPcopy Create free account
hub / github.com/devspace-sh/devspace / unregister

Method unregister

pkg/util/interrupt/interrupt.go:93–106  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

91}
92
93func (h *Handler) unregister(id string) {
94 h.notifyMutex.Lock()
95 defer h.notifyMutex.Unlock()
96
97 newNotify := []notify{}
98 for _, n := range h.notify {
99 if id == n.id {
100 continue
101 }
102
103 newNotify = append(newNotify, n)
104 }
105 h.notify = newNotify
106}
107
108// Run ensures that the function fn is run and runs the notify function if interrupted meanwhile
109func (h *Handler) Run(fn func() error, notify func()) error {

Callers 2

RunMethod · 0.95
RunAlwaysMethod · 0.95

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected