diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-02-02 19:18:14 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-02-02 19:18:14 +0100 |
commit | 72601651407754270a66ac5c1e8fc2ce24832f7c (patch) | |
tree | 06eeb83122246c1c73a59cadf21b6a69688e716a | |
parent | 33de6758b72698fbc8e8b0a708992dbfbe9573cf (diff) |
Fix: Download bar should be joined in blocking tokio task
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r-- | src/commands/source.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/source.rs b/src/commands/source.rs index f3f65a4..5284678 100644 --- a/src/commands/source.rs +++ b/src/commands/source.rs @@ -286,8 +286,9 @@ pub async fn download( }) .flatten() .collect::<futures::stream::FuturesUnordered<_>>() - .collect::<Result<()>>() - .await; - multi.join()?; + .collect::<Result<()>>(); + + let multibar_block = tokio::task::spawn_blocking(move || multi.join()); + let (r, _) = tokio::join!(r, multibar_block); r } |