Skip to content

Commit

Permalink
Add comment about Report callers needing to cancel context
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Oct 12, 2023
1 parent e9fc097 commit 89ca86b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func (dp *downloadProgressReporter) Write(b []byte) (int, error) {
return n, nil
}

// Report periodically reports download progress to registered observers. Callers MUST cancel
// the context passed to this method to avoid resource leaks.
func (dp *downloadProgressReporter) Report(ctx context.Context) {
started := time.Now()
dp.started = started
Expand Down

0 comments on commit 89ca86b

Please sign in to comment.