Taskmanager: Remove clean_shutdown (#10314)

There is no reason for this function, tokio already blocks automatically until all tasks are ended.
Another reason to remove this feature is `mpsc_background_tasks` unbounded channel. Recently this
channel was reporting too many unprocessed elements. We assume that this was a result of a lot of
very shot lived tasks that somehow flooded this channel.
This commit is contained in:
Bastian Köcher
2021-11-19 21:30:37 +01:00
committed by GitHub
parent 5ea4823dab
commit 25239c8642
4 changed files with 136 additions and 260 deletions
+1 -2
View File
@@ -98,7 +98,7 @@ where
pin_mut!(f);
tokio_runtime.block_on(main(f))?;
tokio_runtime.block_on(task_manager.clean_shutdown());
drop(task_manager);
Ok(())
}
@@ -154,7 +154,6 @@ impl<C: SubstrateCli> Runner<C> {
self.print_node_infos();
let mut task_manager = self.tokio_runtime.block_on(initialize(self.config))?;
let res = self.tokio_runtime.block_on(main(task_manager.future().fuse()));
self.tokio_runtime.block_on(task_manager.clean_shutdown());
Ok(res?)
}