Skip to content

Commit 779fb1f

Browse files
authored
fix(zstd): default back to GOMAXPROCS concurrency (#2404)
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.
1 parent 4392bc9 commit 779fb1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zstd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func getDecoder(params ZstdDecoderParams) *zstd.Decoder {
5757
}
5858
// It's possible to race and create multiple new readers.
5959
// Only one will survive GC after use.
60-
zstdDec, _ := zstd.NewReader(nil)
60+
zstdDec, _ := zstd.NewReader(nil, zstd.WithDecoderConcurrency(0))
6161
zstdDecMap.Store(params, zstdDec)
6262
return zstdDec
6363
}

0 commit comments

Comments
 (0)