Codebase list golang-github-vbauerster-mpb / fba920e
rename frame.shutdown to frame.complete Vladimir Bauer 4 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
6464 type frame struct {
6565 reader io.Reader
6666 lines int
67 shutdown bool
6867 abort bool
68 complete bool
6969 }
7070
7171 func newBar(container *Progress, bs *bState) (*Bar, func()) {
334334 b.frameCh <- &frame{
335335 reader: reader,
336336 lines: lines + 1,
337 shutdown: s.completed && !s.completeFlushed,
338337 abort: s.aborted && !s.completeFlushed,
338 complete: s.completed && !s.completeFlushed,
339339 }
340340 s.completeFlushed = s.completed || s.aborted
341341 }()
313313 }
314314 if frame.abort {
315315 s.barShutdownQueue = append(s.barShutdownQueue, b)
316 } else if frame.shutdown {
316 } else if frame.complete {
317317 // shutdown at next flush
318318 // this ensures no bar ends up with less than 100% rendered
319319 defer func() {