make ctx.spawn blocking (#3337)

* make spawn sync

* improve error type
This commit is contained in:
Andronik Ordian authored and GitHub committed 2021-06-21 20:43:40 -05:00
1 parent 9fa5d28e0b
commit ffc6f7c731
16 files changed
+27 -80

No files matched your search

@@ -76,7 +76,6 @@ where
.with_validator_index(from_validator)
.with_relay_parent(parent);
ctx.spawn("pov-fetcher", fetch_pov_job(pov_hash, pending_response.boxed(), span, tx).boxed())
.await
.map_err(|e| Fatal::SpawnTask(e))?;
Ok(())
}
@@ -189,7 +189,6 @@ impl FetchTask {
let (handle, kill) = oneshot::channel();
ctx.spawn("chunk-fetcher", running.run(kill).boxed())
.await
.map_err(|e| Fatal::SpawnTask(e))?;
Ok(FetchTask {