Codebase list golang-github-vbauerster-mpb / 7b504dc
shutdown field Vladimir Bauer 3 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
3131 id int
3232 priority int
3333 reqWidth int
34 shutdown int
3435 total int64
3536 current int64
3637 refill int64
399400 }
400401
401402 func (b *Bar) render(tw int) {
402 var done bool
403403 fn := func(s *bState) {
404404 var rows []io.Reader
405405 stat := newStatistics(tw, s)
417417 }
418418 }
419419 frame := &renderFrame{rows: rows}
420 if !done && (s.completed || s.aborted) {
421 frame.shutdown++
420 if s.completed || s.aborted {
421 s.shutdown++
422 frame.shutdown = s.shutdown
422423 b.cancel()
423424 }
424425 b.frameCh <- frame
426427 select {
427428 case b.operateState <- fn:
428429 case <-b.done:
429 done = true
430430 fn(b.bs)
431431 }
432432 }