MCPcopy
hub / github.com/git-lfs/git-lfs / walk

Method walk

tools/filetools.go:396–410  ·  view source on GitHub ↗
(children []os.FileInfo, fn func([]os.FileInfo))

Source from the content-addressed store, hash-verified

394}
395
396func (w *fastWalker) walk(children []os.FileInfo, fn func([]os.FileInfo)) {
397 cur := atomic.AddInt32(w.cur, 1)
398 if cur > w.limit {
399 fn(children)
400 atomic.AddInt32(w.cur, -1)
401 return
402 }
403
404 w.wg.Add(1)
405 go func() {
406 fn(children)
407 w.wg.Done()
408 atomic.AddInt32(w.cur, -1)
409 }()
410}
411
412func (w *fastWalker) Wait() {
413 w.wg.Wait()

Callers 2

WalkMethod · 0.95
AssertMethod · 0.45

Calls 2

AddMethod · 0.65
DoneMethod · 0.45

Tested by 1

AssertMethod · 0.36