Update module github.com/vbauerster/mpb/v8 to v8.6.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2023-08-28 13:16:53 +00:00
committed by GitHub
parent 009ff3af69
commit fe11db1e81
9 changed files with 63 additions and 33 deletions

View File

@ -201,10 +201,15 @@ func (p *Progress) traverseBars(cb func(b *Bar) bool) {
}
}
// UpdateBarPriority same as *Bar.SetPriority(int).
func (p *Progress) UpdateBarPriority(b *Bar, priority int) {
// UpdateBarPriority either immediately or lazy.
// With lazy flag order is updated after the next refresh cycle.
// If you don't care about laziness just use *Bar.SetPriority(int).
func (p *Progress) UpdateBarPriority(b *Bar, priority int, lazy bool) {
if b == nil {
return
}
select {
case p.operateState <- func(s *pState) { s.hm.fix(b, priority) }:
case p.operateState <- func(s *pState) { s.hm.fix(b, priority, lazy) }:
case <-p.done:
}
}