mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
feat(tasks): add WorkerPool with per-thread Worker state (#22154)
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
02513ecf3b
commit
2eec519bf9
@@ -276,6 +276,7 @@ where
|
||||
F: DatabaseProviderROFactory<Provider: TrieCursorFactory + HashedCursorFactory>
|
||||
+ Clone
|
||||
+ Send
|
||||
+ Sync
|
||||
+ 'static,
|
||||
{
|
||||
// start preparing transactions immediately
|
||||
|
||||
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user