Codebase list golang-github-vbauerster-mpb / 6e22d3f
remove example: don't drop aborted bar Vladimir Bauer 4 years ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
2525 decor.Name(name),
2626 decor.EwmaETA(decor.ET_STYLE_GO, 60, decor.WCSyncSpace),
2727 ),
28 mpb.AppendDecorators(decor.Percentage()),
28 mpb.AppendDecorators(decor.Percentage(decor.WCSyncSpace)),
2929 )
3030 go func() {
3131 defer wg.Done()
3636 // EWMA's unit of measure is an iteration's duration
3737 start := time.Now()
3838 if bar.ID() == 2 && i >= 42 {
39 // aborting and removing while bar is running
40 bar.Abort(true)
39 bar.Abort(false)
4140 }
4241 time.Sleep(time.Duration(rng.Intn(10)+1) * max / 10)
4342 bar.Increment()