diff --git a/bar.go b/bar.go index 9b617b8..a238149 100644 --- a/bar.go +++ b/bar.go @@ -277,7 +277,7 @@ } } -func (b *Bar) render(tw int, flushed chan struct{}, prependWs, appendWs *widthSync) <-chan []byte { +func (b *Bar) render(tw int, prependWs, appendWs *widthSync) <-chan []byte { ch := make(chan []byte) go func() { @@ -292,8 +292,6 @@ select { case b.ops <- func(s *state) { if s.completed { - fmt.Fprintln(os.Stderr, "bar completed") - // <-flushed b.Complete() } result <- *s diff --git a/progress.go b/progress.go index c366e95..aa0cf1b 100644 --- a/progress.go +++ b/progress.go @@ -214,10 +214,9 @@ tw, _, _ := cwriter.GetTermSize() - flushed := make(chan struct{}) sequence := make([]<-chan []byte, numBars) for i, b := range conf.bars { - sequence[i] = b.render(tw, flushed, prependWs, appendWs) + sequence[i] = b.render(tw, prependWs, appendWs) } for buf := range fanIn(sequence...) { @@ -229,7 +228,6 @@ } conf.cw.Flush() - close(flushed) case <-conf.cancel: conf.ticker.Stop() conf.cancel = nil