feat(tasks): add WorkerPool with per-thread Worker state (#22154)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Georgios Konstantopoulos
2026-02-16 15:46:51 -08:00
committed by GitHub
parent 02513ecf3b
commit 2eec519bf9
6 changed files with 312 additions and 55 deletions

View File

@@ -276,6 +276,7 @@ where
F: DatabaseProviderROFactory<Provider: TrieCursorFactory + HashedCursorFactory>
+ Clone
+ Send
+ Sync
+ 'static,
{
// start preparing transactions immediately

View File

@@ -299,7 +299,7 @@ where
);
let ctx = self.ctx.clone();
self.executor.prewarming_pool().install(|| {
self.executor.prewarming_pool().install_fn(|| {
bal.par_iter().for_each_init(
|| (ctx.clone(), None::<CachedStateProvider<reth_provider::StateProviderBox>>),
|(ctx, provider), account| {