Skip to content

Using set_max_refresh_rate prevents bar from updating, is not defeated by tick/flush #118

@ZoomRmc

Description

@ZoomRmc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions