We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
spawn_blocking
1 parent 59acfcc commit a25e9c1Copy full SHA for a25e9c1
src/dist/manifestation.rs
@@ -308,18 +308,21 @@ impl Manifestation {
308
&& let Some(message) = download_rx.recv().await
309
{
310
let (component_bin, installer_file) = message?;
311
- current_tx = {
+ current_tx = tokio::task::spawn_blocking({
312
let this = self.clone();
313
let new_manifest = new_manifest.clone();
314
let download_cfg = download_cfg.clone();
315
- component_bin.install(
316
- installer_file,
317
- current_tx,
318
- &new_manifest,
319
- &this,
320
- &download_cfg,
321
- )
322
- }?;
+ move || {
+ component_bin.install(
+ installer_file,
+ current_tx,
+ &new_manifest,
+ &this,
+ &download_cfg,
+ )
323
+ }
324
+ })
325
+ .await??;
326
counter += 1;
327
}
328
Ok::<_, Error>(current_tx)
0 commit comments