mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Update tokio to 0.2 again and remove TaskExecutors (#786)
* upgrade tokio again * Remove WrappedExecutor * switch to spawn_blocking
This commit is contained in:
@@ -62,7 +62,7 @@ use polkadot_primitives::{
|
||||
}
|
||||
};
|
||||
use polkadot_cli::{
|
||||
ProvideRuntimeApi, AbstractService, ParachainHost, IsKusama, WrappedExecutor,
|
||||
ProvideRuntimeApi, AbstractService, ParachainHost, IsKusama,
|
||||
service::{self, Roles, SelectChain}
|
||||
};
|
||||
use polkadot_network::validation::{LeafWorkParams, ValidationNetwork};
|
||||
@@ -308,7 +308,7 @@ fn run_collator_node<S, E, P, Extrinsic>(
|
||||
Extrinsic: service::Codec + Send + Sync + 'static,
|
||||
{
|
||||
let runtime = tokio::runtime::Runtime::new().map_err(|e| format!("{:?}", e))?;
|
||||
let spawner = WrappedExecutor(service.spawn_task_handle());
|
||||
let spawner = service.spawn_task_handle();
|
||||
|
||||
let client = service.client();
|
||||
let network = service.network();
|
||||
@@ -427,7 +427,7 @@ fn run_collator_node<S, E, P, Extrinsic>(
|
||||
);
|
||||
|
||||
let exit = inner_exit_2.clone();
|
||||
tokio::spawn(future::select(res.boxed(), exit).map(drop).map(|_| Ok(())).compat());
|
||||
tokio::spawn(future::select(res.boxed(), exit));
|
||||
});
|
||||
}
|
||||
future::ok(())
|
||||
@@ -450,7 +450,7 @@ fn run_collator_node<S, E, P, Extrinsic>(
|
||||
inner_exit.clone()
|
||||
).map(drop);
|
||||
|
||||
tokio::spawn(future.map(|_| Ok(())).compat());
|
||||
tokio::spawn(future);
|
||||
}
|
||||
}.boxed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user