MCPcopy Create free account
hub / github.com/driangle/taskmd / Stop

Method Stop

apps/cli/internal/watcher/watcher.go:89–101  ·  view source on GitHub ↗

Stop signals the watcher to stop.

()

Source from the content-addressed store, hash-verified

87
88// Stop signals the watcher to stop.
89func (w *Watcher) Stop() {
90 w.mu.Lock()
91 defer w.mu.Unlock()
92 select {
93 case <-w.done:
94 // already closed
95 default:
96 close(w.done)
97 }
98 if w.watcher != nil {
99 w.watcher.Close()
100 }
101}
102
103func (w *Watcher) addRecursive(fsw *fsnotify.Watcher, root string) error {
104 return filepath.WalkDir(root, func(path string, d os.DirEntry, err error) error {

Callers 6

TestWatcher_DebouncesFunction · 0.80
TestWatcher_StopFunction · 0.80
StartMethod · 0.80
StartMethod · 0.80

Calls

no outgoing calls

Tested by 4

TestWatcher_DebouncesFunction · 0.64
TestWatcher_StopFunction · 0.64