console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.22k stars 238 forks source link

Example for combination of multi progress + tokio/async #508

Closed peschu123 closed 1 year ago

peschu123 commented 1 year ago

Hi,

when I first looked at the examples here I was missing an example for the multi progress + tokio with an indefinite/undefined number of items instead of only 2-3 futures.

I could integrate indicatif now in my app and I like it a lot. It was very helpful to visualize async/blocking behavior.

So I made a small repo with an example. There is a bit of unnecessary stuff in it (uuid generation, limiting concurrent tasks).

Just in case it helps somebody.

https://github.com/peschu123/example_async_tokio_indicatif

Feel free to use it and do whatever you want. It's just an educational example no guaranties about nothing.

Indicatif is really great and simple to use! Thanks for the good work, it's next level for my cli app. ;-)