We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I perform a race condition when I try to setup a dynamic max (like get requests with pagination for example)
To reproduce:
var ( bar = progressbar.Default(0, "Test dynamic max") wg = &sync.WaitGroup{} length = 1000 ) wg.Add(length) for i := 0; i < length; i++ { bar.ChangeMax64(int64(i + 1)) go func(b *progressbar.ProgressBar) { defer b.Add(1) defer wg.Done() time.Sleep(3 * time.Second) }(bar) time.Sleep(time.Second) } wg.Wait()
After checking code, it seems missing mutex around progress bar max when ChangeMax64 called
Thanks!
The text was updated successfully, but these errors were encountered:
Could you submit a PR?
Sorry, something went wrong.
#183
My PR has been merged, this issue is fixed. Please close :)
No branches or pull requests
Hello,
I perform a race condition when I try to setup a dynamic max (like get requests with pagination for example)
To reproduce:
After checking code, it seems missing mutex around progress bar max when ChangeMax64 called
Thanks!
The text was updated successfully, but these errors were encountered: