summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/blockdec.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2019-12-06 09:17:29 +0000
committerValentin Rothberg <rothberg@redhat.com>2019-12-06 10:27:06 +0100
commit625a02a28616ee519f09f89da91f5d6a2e78f265 (patch)
tree9919e3d8fd5c7b5a8d6d625072bca2f672db3729 /vendor/github.com/klauspost/compress/zstd/blockdec.go
parent465e142bf28ed04e78c8b32c0ecef6fe72a38ecc (diff)
downloadpodman-625a02a28616ee519f09f89da91f5d6a2e78f265.tar.gz
podman-625a02a28616ee519f09f89da91f5d6a2e78f265.tar.bz2
podman-625a02a28616ee519f09f89da91f5d6a2e78f265.zip
build(deps): bump github.com/containers/storage from 1.15.0 to 1.15.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.0 to 1.15.2. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.15.0...v1.15.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/blockdec.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/blockdec.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go
index 47cc21d6d..ed670bcc7 100644
--- a/vendor/github.com/klauspost/compress/zstd/blockdec.go
+++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go
@@ -89,6 +89,7 @@ type blockDec struct {
sequenceBuf []seq
tmp [4]byte
err error
+ decWG sync.WaitGroup
}
func (b *blockDec) String() string {
@@ -105,6 +106,7 @@ func newBlockDec(lowMem bool) *blockDec {
input: make(chan struct{}, 1),
history: make(chan *history, 1),
}
+ b.decWG.Add(1)
go b.startDecoder()
return &b
}
@@ -183,11 +185,13 @@ func (b *blockDec) Close() {
close(b.input)
close(b.history)
close(b.result)
+ b.decWG.Wait()
}
// decodeAsync will prepare decoding the block when it receives input.
// This will separate output and history.
func (b *blockDec) startDecoder() {
+ defer b.decWG.Done()
for range b.input {
//println("blockDec: Got block input")
switch b.Type {