Skip to content
New issue

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

incrementing vs setting progress #33

Closed
tcurdt opened this issue Dec 26, 2018 · 4 comments
Closed

incrementing vs setting progress #33

tcurdt opened this issue Dec 26, 2018 · 4 comments

Comments

@tcurdt
Copy link

tcurdt commented Dec 26, 2018

The increment only or relative interface feels a little awkward for some use cases. Is there a particular reason not to allow for setting the absolute value of the progress?

@vbauerster
Copy link
Owner

Can you please elaborate on your use case? 95% of use cases is to increment because of io.Reader and io.Writer.

@tcurdt
Copy link
Author

tcurdt commented Dec 28, 2018

I had a producer/consumer setup that was already reporting statistics. So I had total number of jobs and finished jobs. I could either read the current progress value and calculate the increment to turn it into a relative value or I could pass a reference to the bar into all the consumers.
Both solutions are not really very elegant.

@vbauerster
Copy link
Owner

vbauerster commented Feb 17, 2019

Sorry for late reply, I've implemented this in set-current branch.
Can you please check, if it's ok for your needs?

@tcurdt
Copy link
Author

tcurdt commented Feb 17, 2019

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants