MCPcopy Create free account
hub / github.com/devld/go-drive / Progress

Method Progress

script/call_common.go:63–74  ·  view source on GitHub ↗
(loaded int64, abs bool)

Source from the content-addressed store, hash-verified

61}
62
63func (s *scriptTaskCtx) Progress(loaded int64, abs bool) {
64 s.mu.Lock()
65 defer s.mu.Unlock()
66 if abs {
67 s.loaded = loaded
68 } else {
69 s.loaded += loaded
70 }
71 if s.onUpdate != nil {
72 s.onUpdate.Call(s, s.loaded, s.total)
73 }
74}
75
76func (s *scriptTaskCtx) Total(total int64, abs bool) {
77 s.mu.Lock()

Callers

nothing calls this directly

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
CallMethod · 0.45

Tested by

no test coverage detected