Closed manuels closed 3 years ago
I think I just hit this problem as well. I can't see MultiProgress bars rendered at all until after the tokio future was complete.
I would accept patches for this. I'm not sure how to best approach this.
Yeah, would be great to proceed on this issue. For now as a workaround I found spawning a thread of a sync function, which delegates to the generic async implementation with task::block_on
.
Given mp
a MultiProgress
with tokio you should do let mp = tokio::task::spawn_blocking(move || mp.join().unwrap());
await it with mp.await
in your main task if you want.
While ProgressBar works fine with tokio, MultiProgress does not, because there is only a blocking
join()
function. It would be great if indicatif's MultiProgress would support tokio!