lib/model: Missing queue.Done and reset between pulls (fixes #5332) (#5626)

This commit is contained in:
Simon Frei
2019-03-27 20:19:35 +01:00
committed by Jakob Borg
parent 0cff66fcbc
commit 8d1eff7e41
2 changed files with 11 additions and 0 deletions

View File

@@ -110,6 +110,13 @@ func (q *jobQueue) Shuffle() {
}
}
func (q *jobQueue) Reset() {
q.mut.Lock()
defer q.mut.Unlock()
q.progress = nil
q.queued = nil
}
func (q *jobQueue) lenQueued() int {
q.mut.Lock()
defer q.mut.Unlock()