Struct fclones::progress::FastProgressBar [−][src]
pub struct FastProgressBar { /* fields omitted */ }
Expand description
A wrapper over indicatif::ProgressBar
that makes updating its progress lockless.
Unfortunately indicatif::ProgressBar
wraps state in a Mutex
, so updates are slow
and can become a bottleneck in multithreaded context.
This wrapper uses atomic_counter::RelaxedCounter
to keep shared state without ever blocking
writers. That state is copied repeatedly by a background thread to an underlying
ProgressBar
at a low rate.
Implementations
Wrap an existing ProgressBar
and start the background updater-thread.
The thread periodically copies the FastProgressBar
position into the wrapped
ProgressBar
instance.
Create a new preconfigured animated spinner with given message.
Create a new preconfigured progress bar with given message.
Create a new preconfigured progress bar with given message. Displays progress in bytes.
Creates a new invisible progress bar.
This is useful when you need to disable progress bar, but you need to pass an instance
of a ProgressBar
to something that expects it.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FastProgressBar
impl Send for FastProgressBar
impl Sync for FastProgressBar
impl Unpin for FastProgressBar
impl UnwindSafe for FastProgressBar