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 authored and GitHub committed 2020-08-17 12:26:32 +00:00
1 parent cf7133cbcf
commit ab1a513265
4 files changed
+42 -2

No files matched your search

@@ -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)
}