MCPcopy
hub / github.com/syncthing/syncthing / clean

Method clean

lib/ignore/ignore.go:334–349  ·  view source on GitHub ↗
(d time.Duration)

Source from the content-addressed store, hash-verified

332}
333
334func (m *Matcher) clean(d time.Duration) {
335 t := time.NewTimer(d / 2)
336 for {
337 select {
338 case <-m.stop:
339 return
340 case <-t.C:
341 m.mut.Lock()
342 if m.matches != nil {
343 m.matches.clean(d)
344 }
345 t.Reset(d / 2)
346 m.mut.Unlock()
347 }
348 }
349}
350
351func hashPatterns(patterns []Pattern) string {
352 h := sha256.New()

Callers 1

NewFunction · 0.95

Calls 2

UnlockMethod · 0.80
ResetMethod · 0.65

Tested by

no test coverage detected