auto-start next conversion batch after completion if pending

This commit is contained in:
radik878 2025-11-27 12:32:19 +02:00 committed by GitHub
parent 6426257c0f
commit 4dad65cbc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)