diff --git a/bar.go b/bar.go index 30c64f2..4fd0c41 100644 --- a/bar.go +++ b/bar.go @@ -268,7 +268,7 @@ } func (b *Bar) render(tw int, flushed chan struct{}, prependWs, appendWs *widthSync) <-chan []byte { - ch := make(chan []byte) + ch := make(chan []byte, 1) go func() { defer func() { diff --git a/progress.go b/progress.go index cdff1f0..dcc586d 100644 --- a/progress.go +++ b/progress.go @@ -211,9 +211,7 @@ sequence[i] = b.render(tw, flushed, prependWs, appendWs) } - ch := fanIn(sequence...) - - for buf := range ch { + for buf := range fanIn(sequence...) { conf.cw.Write(buf) }