schollz / progressbar

A really basic thread-safe progress bar for Golang applications
https://pkg.go.dev/github.com/schollz/progressbar/v3?tab=doc
MIT License
4.08k stars 220 forks source link

fix: Protect RenderBlank() and IsFinished() with the lock #164

Closed RichieSams closed 7 months ago

RichieSams commented 1 year ago

RenderBlank() calls render() which requires the mutex to be held. IsFinished accesses p.state, which also requires the mutex to be held.