-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cleanups/improvements to streams/queue.h/c++ #590
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
jasnell
commented
May 1, 2023
- Should not remove the close sentinel from the buffer in handleRead
- Avoid using kj::Refcounted for queue entries
81b760d
to
34199ce
Compare
|
34199ce
to
11e4aa9
Compare
11e4aa9
to
219d0c3
Compare
harrishancock
approved these changes
May 4, 2023
Should not remove the close sentinel from the buffer in handleRead
No need to refcount these any more.
Finishes the change that removed Refcounted from ValueReadable and ByteReadable. The challenge is that if the controller is synchronously closed/errored while the read is processing, we need to be defer releasing the controller and setting the state until after the read call completes in order to allow the appropriate cleanup. Previously this was using kj::Refcounted but that was rather wasteful and potentially error prone. This introduces a ReadPendingScope that handles the synchronously deferred cleanup.
c56317f
to
8145a33
Compare
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.