MCPcopy
hub / github.com/syncthing/syncthing / stopWatch

Method stopWatch

lib/model/folder.go:1016–1021  ·  view source on GitHub ↗

stopWatch immediately aborts watching and may be called asynchronously

()

Source from the content-addressed store, hash-verified

1014
1015// stopWatch immediately aborts watching and may be called asynchronously
1016func (f *folder) stopWatch() {
1017 f.watchMut.Lock()
1018 f.watchCancel()
1019 f.watchMut.Unlock()
1020 f.setWatchError(nil, 0)
1021}
1022
1023// scheduleWatchRestart makes sure watching is restarted from the main for loop
1024// in a folder's Serve and thus may be called asynchronously (e.g. when ignores change).

Callers 2

restartWatchMethod · 0.95
setErrorMethod · 0.95

Calls 2

setWatchErrorMethod · 0.95
UnlockMethod · 0.80

Tested by

no test coverage detected