MCPcopy
hub / github.com/IBM/sarama / releaseEncoder

Function releaseEncoder

zstd.go:71–77  ·  view source on GitHub ↗
(params ZstdEncoderParams, enc *zstd.Encoder)

Source from the content-addressed store, hash-verified

69}
70
71func releaseEncoder(params ZstdEncoderParams, enc *zstd.Encoder) {
72 select {
73 case getZstdEncoderChannel(params) <- enc:
74 default:
75 // pool is at capacity; let the encoder be garbage collected.
76 }
77}
78
79// zstdDecoderKey keys the decoder cache on maxDecodedSize as well as params,
80// since the size bound is fixed when the decoder is built and can't be changed

Callers 1

zstdCompressFunction · 0.85

Calls 1

getZstdEncoderChannelFunction · 0.85

Tested by

no test coverage detected