mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
parallel warmup to exit early if nil
This commit is contained in:
parent
7c2ed8e01f
commit
89f8a43509
@ -307,6 +307,9 @@ func parallelTransform(ctx context.Context, in chan pair, out chan pair, transfo
|
||||
}
|
||||
|
||||
func parallelWarmup(ctx context.Context, db kv.RoDB, bucket string, workers int) error {
|
||||
if db == nil || ctx == nil || workers == 0 {
|
||||
return nil
|
||||
}
|
||||
g, ctx := errgroup.WithContext(ctx)
|
||||
g.SetLimit(workers)
|
||||
for i := 0; i < 256; i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user