mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
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:
@@ -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?)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user