Skip to content

Commit b848163

Browse files
committed
Made the progress bar wait at most 100ms for writing to stderr.
1 parent 1848664 commit b848163

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

go/progress/bar.go

+1
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,6 @@ func (b *Bar) Update(total, completed, errors int) {
147147
b.total = total
148148
b.lastRender = now
149149

150+
os.Stderr.SetWriteDeadline(time.Now().Add(100 * time.Millisecond))
150151
fmt.Fprintf(os.Stderr, "\r%s%s%s", prefix, b.filler(prefix, suffix), suffix)
151152
}

0 commit comments

Comments
 (0)