Skip to content

Commit e3ccebe

Browse files
remove time block from example
Co-authored-by: ccoVeille <[email protected]>
1 parent b34a57d commit e3ccebe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/sample-cmd/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ func main() {
4242
select {
4343
case <-ctx.Done():
4444
return nil, ctx.Err()
45-
default:
45+
case <-time.After(50 * time.Millisecond):
4646
// do a time taking process or compute a small subset of a bigger problem,
4747
// this could be processing batches of a data set.
48-
time.Sleep(50 * time.Millisecond)
4948

5049
// increment the progress to display on the progress bar.
5150
p.Incr(int64(1))

0 commit comments

Comments
 (0)