jacobkaufmann / evangelion

a prototype ethereum block builder
Apache License 2.0
84 stars 10 forks source link

fix: spawn build jobs as blocking tasks #25

Closed jacobkaufmann closed 1 year ago

jacobkaufmann commented 1 year ago

build jobs are synchronous and do not yield, so those tasks can block the executor from driving other futures forward. here we spawn the build jobs with tokio::task::spawn_blocking to spawn on a thread where "blocking is acceptable". later work may add a synchronization primitive (e.g. semaphore) to limit the number of concurrent build jobs.