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

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2024-01-17 18:51:28 +00:00
committed by GitHub
parent 1c8179817d
commit f9a05717a0
7 changed files with 43 additions and 30 deletions

View File

@ -68,8 +68,6 @@ func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {
ctx = context.Background()
}
ctx, cancel := context.WithCancel(ctx)
delayRC := make(chan struct{}, 1)
delayRC <- struct{}{}
s := &pState{
ctx: ctx,
hm: make(heapManager),
@ -78,7 +76,6 @@ func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {
renderReq: make(chan time.Time),
popPriority: math.MinInt32,
refreshRate: defaultRefreshRate,
delayRC: delayRC,
queueBars: make(map[*Bar]*Bar),
output: os.Stdout,
debugOut: io.Discard,
@ -262,11 +259,17 @@ func (p *Progress) Shutdown() {
func (p *Progress) serve(s *pState, cw *cwriter.Writer) {
defer p.pwg.Done()
var err error
w := cwriter.New(io.Discard)
var w *cwriter.Writer
renderReq := s.renderReq
operateState := p.operateState
interceptIO := p.interceptIO
if s.delayRC != nil {
w = cwriter.New(io.Discard)
} else {
w, cw = cw, nil
}
for {
select {
case <-s.delayRC: