We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b34a57d commit e3ccebeCopy full SHA for e3ccebe
examples/sample-cmd/main.go
@@ -42,10 +42,9 @@ func main() {
42
select {
43
case <-ctx.Done():
44
return nil, ctx.Err()
45
- default:
+ case <-time.After(50 * time.Millisecond):
46
// do a time taking process or compute a small subset of a bigger problem,
47
// this could be processing batches of a data set.
48
- time.Sleep(50 * time.Millisecond)
49
50
// increment the progress to display on the progress bar.
51
p.Incr(int64(1))
0 commit comments