mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-07 05:25:14 -05:00
fix: spawn js service task on blocking pool (#4180)
This commit is contained in:
@@ -538,7 +538,9 @@ where
|
||||
let (to_db_service, rx) = mpsc::channel(1);
|
||||
let (ready_tx, ready_rx) = std::sync::mpsc::channel();
|
||||
let this = self.clone();
|
||||
self.inner.task_spawner.spawn(Box::pin(async move {
|
||||
// this needs to be on a blocking task because it only does blocking work besides waiting
|
||||
// for db requests
|
||||
self.inner.task_spawner.spawn_blocking(Box::pin(async move {
|
||||
this.js_trace_db_service_task(at, rx, ready_tx, db).await
|
||||
}));
|
||||
// wait for initialization
|
||||
|
||||
Reference in New Issue
Block a user