Repository navigation
Bind a prepared response to the slot that owns its bytes - #630
Merged
Merged
Conversation
A Prepared response was a Copy header that any code could pair with whatever objects a slot held, so its validity rested on nothing having built in that slot since, and on publishing it into the right slot. Now a slot prepares its own responses: build and empty return values that mutably borrow the slot until the response is published there or dropped. A header can only be published with the objects of the slot that prepared it, and nothing else can build in that slot meanwhile. To hold such a borrow while the session runs its handlers, the slots move out of the session into a Responder with the transport writer. Broadcast handling no longer reaches the control handler that takes the solicited slot.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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.
Binds a prepared response to the slot that owns its bytes: Prepared borrows its slot and publishes into it, so it can only be sent with that slot's bytes and can't outlive another build of the same slot. The slots move into a Responder with the writer. Behavior-neutral; passes the pins from the preceding PR unedited. Conformance passed on the branch.