mirror of
https://github.com/containers/skopeo.git
synced 2025-09-21 09:57:19 +00:00
Update to github.com/vbauerster/mpb v7.1.5
... to fix https://github.com/vbauerster/mpb/issues/100 . > go get github.com/vbauerster/mpb/v7@latest > make vendor Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
37
vendor/github.com/vbauerster/mpb/v7/bar.go
generated
vendored
37
vendor/github.com/vbauerster/mpb/v7/bar.go
generated
vendored
@@ -268,32 +268,37 @@ func (b *Bar) SetPriority(priority int) {
|
||||
// if bar is already in complete state. If drop is true bar will be
|
||||
// removed as well.
|
||||
func (b *Bar) Abort(drop bool) {
|
||||
done := make(chan struct{})
|
||||
select {
|
||||
case b.operateState <- func(s *bState) {
|
||||
if s.completed == true {
|
||||
close(done)
|
||||
return
|
||||
}
|
||||
if drop {
|
||||
b.container.dropBar(b)
|
||||
b.cancel()
|
||||
return
|
||||
}
|
||||
// container must be run during lifetime of this inner goroutine
|
||||
// we control this by done channel declared above
|
||||
go func() {
|
||||
var uncompleted int
|
||||
b.container.traverseBars(func(bar *Bar) bool {
|
||||
if b != bar && !bar.Completed() {
|
||||
uncompleted++
|
||||
return false
|
||||
if drop {
|
||||
b.container.dropBar(b)
|
||||
} else {
|
||||
var uncompleted int
|
||||
b.container.traverseBars(func(bar *Bar) bool {
|
||||
if b != bar && !bar.Completed() {
|
||||
uncompleted++
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
if uncompleted == 0 {
|
||||
b.container.refreshCh <- time.Now()
|
||||
}
|
||||
return true
|
||||
})
|
||||
if uncompleted == 0 {
|
||||
b.container.refreshCh <- time.Now()
|
||||
}
|
||||
b.cancel()
|
||||
close(done) // release hold of Abort
|
||||
}()
|
||||
b.cancel()
|
||||
}:
|
||||
<-b.done
|
||||
// guarantee: container is alive during lifetime of this hold
|
||||
<-done
|
||||
case <-b.done:
|
||||
}
|
||||
}
|
||||
|
2
vendor/github.com/vbauerster/mpb/v7/go.mod
generated
vendored
2
vendor/github.com/vbauerster/mpb/v7/go.mod
generated
vendored
@@ -4,7 +4,7 @@ require (
|
||||
github.com/VividCortex/ewma v1.2.0
|
||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
|
||||
github.com/mattn/go-runewidth v0.0.13
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e
|
||||
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0
|
||||
)
|
||||
|
||||
go 1.14
|
||||
|
4
vendor/github.com/vbauerster/mpb/v7/go.sum
generated
vendored
4
vendor/github.com/vbauerster/mpb/v7/go.sum
generated
vendored
@@ -6,5 +6,5 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4
|
||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0 h1:xrCZDmdtoloIiooiA9q0OQb9r8HejIHYoHGhGCe1pGg=
|
||||
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
Reference in New Issue
Block a user