File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -284,28 +284,30 @@ impl Manifestation {
284
284
let ( component, format, installer_file) = message?;
285
285
let component_name = component. short_name ( & new_manifest) ;
286
286
let notify_handler = Arc :: clone ( & download_cfg. notify_handler ) ;
287
- let new_tx = {
287
+ current_tx = tokio :: task :: spawn_blocking ( {
288
288
let this = Arc :: clone ( & self ) ;
289
289
let new_manifest = Arc :: clone ( & new_manifest) ;
290
290
let tmp_cx = Arc :: clone ( & download_cfg. tmp_cx ) ;
291
291
let download_cfg = Arc :: clone ( & download_cfg) ;
292
- let download_cfg = ( & * download_cfg) . into ( ) ;
293
- this. install_component (
294
- component,
295
- format,
296
- installer_file,
297
- tmp_cx,
298
- download_cfg,
299
- new_manifest,
300
- current_tx,
301
- )
302
- } ;
292
+ move || {
293
+ let download_cfg = ( & * download_cfg) . into ( ) ;
294
+ this. install_component (
295
+ component,
296
+ format,
297
+ installer_file,
298
+ tmp_cx,
299
+ download_cfg,
300
+ new_manifest,
301
+ current_tx,
302
+ )
303
+ }
304
+ } )
305
+ . await ??;
303
306
( notify_handler) ( Notification :: ComponentInstalled (
304
307
& component_name,
305
308
& self . target_triple ,
306
309
Some ( & self . target_triple ) ,
307
310
) ) ;
308
- current_tx = new_tx?;
309
311
counter += 1 ;
310
312
}
311
313
Ok :: < _ , Error > ( current_tx)
You can’t perform that action at this time.
0 commit comments