mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
auto-start next conversion batch after completion if pending
This commit is contained in:
parent
6426257c0f
commit
4dad65cbc5
1 changed files with 6 additions and 0 deletions
|
|
@ -161,6 +161,12 @@ func (q *conversionQueue) loop() {
|
|||
|
||||
case <-done:
|
||||
done, interrupt = nil, nil
|
||||
if len(txTasks) > 0 {
|
||||
done, interrupt = make(chan struct{}), new(atomic.Int32)
|
||||
tasks := slices.Clone(txTasks)
|
||||
txTasks = txTasks[:0]
|
||||
go q.run(tasks, done, interrupt)
|
||||
}
|
||||
|
||||
case fn := <-q.startBilly:
|
||||
q.billyQueue = append(q.billyQueue, fn)
|
||||
|
|
|
|||
Loading…
Reference in a new issue