-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Allow 'total' to be updated during runtime #82
base: main
Are you sure you want to change the base?
Conversation
Use-Case: I have a multi-threaded program, where one thread traverses a large directory tee to searches for files to work on. A second thread works on these files, even when the first thread is still searching. So while there is already work happening, the list of files to process can still continue to grow. This patch adds the functionality to update the total value to handle this use case. How: I adapted the mechanism as used in the 'bar.current()' attribute and applied it to the variables 'total', 'logic_total' and 'gen_eta'. Also a function bar.update_total(nn) has been added, that regenerates all 3 values appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but this PR might very well get outdated when 2.0 is merged.
Yeah, it does indeed, thank you @DickerDackel. But unfortunately I'm on the brink of releasing something really big, look #51 |
4b0ad33
to
84a403e
Compare
@rsalmei what's the status? |
Hello @TheTechRobo, |
I was asking about your
|
Ohh, I see! You're right! 😬 |
9e0e55f
to
4e582b7
Compare
b29d48a
to
59cea55
Compare
5fca742
to
5d4a62e
Compare
Use-Case:
How:
I adapted the mechanism as used in the 'bar.current()' attribute
and applied it to the variables 'total', 'logic_total' and
'gen_eta'.