Skip to content

Conversation

@mostynb
Copy link
Contributor

@mostynb mostynb commented Aug 30, 2021

This code was previously Get'ing objects from one pool and later Put'ing them to a different pool, so they were never reused.

This code was previously Get'ing objects from one pool and later Put'ing them to a different pool, so they were never reused.
@mostynb
Copy link
Contributor Author

mostynb commented Aug 30, 2021

Also, pooledZipReader seems to be unused because it leaks goroutines- would you be interested in merging something like https://github.com/mostynb/zstdpool-syncpool/blob/main/decoderpool.go (as an un-exported type)?

@klauspost
Copy link
Owner

@mostynb Nice! Thanks!

I don't want to rely on finalizers. I want to fix it properly, ie have a streaming option that only uses the main goroutine.

@mostynb
Copy link
Contributor Author

mostynb commented Aug 30, 2021

I don't want to rely on finalizers. I want to fix it properly, ie have a streaming option that only uses the main goroutine.

I agree that would be preferable. Is it worth commenting out pooledZipReader in the meantime, since it's unused?

@klauspost
Copy link
Owner

@mostynb It is fine to leave. Thanks for the contribution! I will include it in the release I will do shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants