MCPcopy
hub / github.com/SurgeDM/Surge / RemainingTask

Method RemainingTask

internal/engine/concurrent/task.go:50–57  ·  view source on GitHub ↗

RemainingTask returns a Task representing the remaining work, or nil if complete

()

Source from the content-addressed store, hash-verified

48
49// RemainingTask returns a Task representing the remaining work, or nil if complete
50func (at *ActiveTask) RemainingTask() *types.Task {
51 current := at.CurrentOffset.Load()
52 stopAt := at.StopAt.Load()
53 if current >= stopAt {
54 return nil
55 }
56 return &types.Task{Offset: current, Length: stopAt - current}
57}
58
59// GetSpeed returns the current EMA-smoothed speed, decaying if stalled
60func (at *ActiveTask) GetSpeed() float64 {

Callers 3

workerMethod · 0.95
handlePauseMethod · 0.80

Calls

no outgoing calls

Tested by 1