Skip to content

Commit

Permalink
fix(zstd): default back to GOMAXPROCS concurrency (#2404)
Browse files Browse the repository at this point in the history
An upstream change in klauspost/compress#498 changed the default decoder
concurrency from GOMAXPROCS to a maximum of 4. Explicitly pass a value
of 0 via WithDecoderConcurrency so that GOMAXPROCS is used by default
again.
  • Loading branch information
bgreenlee committed Dec 21, 2022
1 parent 4392bc9 commit 779fb1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zstd.go
Expand Up @@ -57,7 +57,7 @@ func getDecoder(params ZstdDecoderParams) *zstd.Decoder {
}
// It's possible to race and create multiple new readers.
// Only one will survive GC after use.
zstdDec, _ := zstd.NewReader(nil)
zstdDec, _ := zstd.NewReader(nil, zstd.WithDecoderConcurrency(0))
zstdDecMap.Store(params, zstdDec)
return zstdDec
}
Expand Down

0 comments on commit 779fb1f

Please sign in to comment.