-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
tick
to MultiProgress to complement join
* Changed `joining` field of `MultiProgress` from `AtomicBool` to `Mutex`. Because the internal `join_impl` can now be called multiple times I figured it's better to use a Mutex as it automatically unlocks preventing panics "bricking" the progress bar. * Because MultiProgress can contain multiple child progress bars I feel like the meaning of a single tick isn't really clear. Just a single state update (`self.rx.recv()`) seems too small. Because of that I allow the user to configure how long do they want a tick to last adding greater flexibility. * Made `is_done` public to let the user know whether they still need to invoke `tick`
- Loading branch information
Showing
2 changed files
with
99 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters