Mpdreamz / shellprogressbar

ShellProgressBar - display progress in your console application
MIT License
1.44k stars 134 forks source link

async Task await breaks progress bar #87

Open hahagu opened 3 years ago

hahagu commented 3 years ago

https://github.com/Mpdreamz/shellprogressbar/blob/master/src/ShellProgressBar.Example/Examples/IntegrationWithIProgressPercentageExample.cs

From the above example, the start function creates a progress bar, and binds ProcessFiles to the progress. What I have, is the exact same, but the ProcessFiles is an async Task, and is await-ed from inside the using statement of the progress bar.

This makes the progress bar always display 100%, and progress is not updated. How would this be solved?