(total int64, abs bool)
| 74 | } |
| 75 | |
| 76 | func (s *scriptTaskCtx) Total(total int64, abs bool) { |
| 77 | s.mu.Lock() |
| 78 | defer s.mu.Unlock() |
| 79 | if abs { |
| 80 | s.total = total |
| 81 | } else { |
| 82 | s.total += total |
| 83 | } |
| 84 | if s.onUpdate != nil { |
| 85 | s.onUpdate.Call(s, s.loaded, s.total) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | type contextWithTimeout struct { |
| 90 | Context Context |