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:
Andronik Ordian
2020-08-17 14:26:32 +02:00
committed by GitHub
parent cf7133cbcf
commit ab1a513265
4 changed files with 42 additions and 2 deletions
@@ -318,7 +318,7 @@ async fn spawn_validate_exhaustive(
let _ = tx.send(res);
};
ctx.spawn("blocking-candidate-validation-task", fut.boxed()).await?;
ctx.spawn_blocking("blocking-candidate-validation-task", fut.boxed()).await?;
rx.await.map_err(Into::into)
}