-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thought bubble to better deal with wrapping EOF and EMPTY chunks #9018
Conversation
Even if we don't fully embrace this approach, I think asking a The contract would then be that |
@gregw, @lorban suggested an alternative solution, which is to modify In this way, chunk wrappers will still know exactly when they need to release, but the benefit is that Furthermore, we introduce |
Closing this as I think the idea has been communicated... but I'm not sure it is actually workable. |
I'd like to keep this open because it is a valid concern that I'd like to examine deeper. |
@sbordet has this been included in your other works etc. Can it now be closed? |
@sbordet closing this as I think you have taken what you need into your branch |
I still think we can do better with retaining terminal chunks.
Since we have few implementations of
Retainable
that throwUnsupportedOperationException
, I think it would be good to have anboolean isRetainable()
method so we can know. ThenRetainable.Wrapper
anda new
Chunk.Wrapper
can take action to use their own reference counter if they are passed a non retainableRetainable
.I think with something like this, we could always call release on passed chunks. If you want to call retain, then you just need to check that it is retainable... which you have to do now anyway!
This is far from complete or perfect.... I just think there might be something there to clean up just a bit.
thoughts?