From 10c91364946ec3b4cfcc1544a03830da4bd6d696 Mon Sep 17 00:00:00 2001 From: Brad Greenlee Date: Thu, 15 Dec 2022 13:13:13 -0800 Subject: [PATCH] fix(zstd): default back to GOMAXPROCS concurrency 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. --- zstd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zstd.go b/zstd.go index f28db806e..6073ce7c4 100644 --- a/zstd.go +++ b/zstd.go @@ -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 }