mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Add spawn_blocking to SubsystemContext (#1570)
* subsystem: add spawn_blocking to SubsystemContext * candidate-validation: use spawn_blocking for exhaustive tasks
This commit is contained in:
@@ -177,6 +177,13 @@ impl<M: Send + 'static, S: SpawnNamed + Send + 'static> SubsystemContext for Tes
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn spawn_blocking(&mut self, name: &'static str, s: Pin<Box<dyn Future<Output = ()> + Send>>)
|
||||
-> SubsystemResult<()>
|
||||
{
|
||||
self.spawn.spawn_blocking(name, s);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn send_message(&mut self, msg: AllMessages) -> SubsystemResult<()> {
|
||||
self.tx.send(msg).await.expect("test overseer no longer live");
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user