Skip to content

Commit

Permalink
fix(zstd): default back to GOMAXPROCS concurrency
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 15, 2022
1 parent 4392bc9 commit 10c9136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zstd.go
Original file line number Diff line number Diff line change
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 10c9136

Please sign in to comment.