In my case, I'd like to set the bar to the exact final total number in case the process doesn't go to completion.
No combination of set/tick/flush does get me an updated state when the ProgressBar goes out of scope.
Looks like there's no final redraw upon exiting the thread. At first I though it might be some kind of a race condition, so checked with sleeping the main thread to no avail.
Some possible solutions in order of preference:
- Make
flush or tick ignore the refresh rate.
- Expose a manual
redraw.
- Add a
finish_with(final: u64) - not ideal, as the ProgressBar.count is not public (why?), which means a duplicating variable is necessary on user's side.
In my case, I'd like to set the bar to the exact final total number in case the process doesn't go to completion.
No combination of
set/tick/flushdoes get me an updated state when the ProgressBar goes out of scope.Looks like there's no final redraw upon exiting the thread. At first I though it might be some kind of a race condition, so checked with sleeping the main thread to no avail.
Some possible solutions in order of preference:
flushortickignore the refresh rate.redraw.finish_with(final: u64)- not ideal, as theProgressBar.countis not public (why?), which means a duplicating variable is necessary on user's side.