Skip to content

Bind a prepared response to the slot that owns its bytes - #630

Merged
jadamcrain merged 1 commit into
mainfrom
refactor/prepared-slot
Oct 22, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
refactor/prepared-slot

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

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.

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.
@jadamcrain
jadamcrain enabled auto-merge October 22, 2026 06:31
@jadamcrain
jadamcrain added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 70d315a Oct 22, 2026
36 checks passed
@jadamcrain
jadamcrain deleted the refactor/prepared-slot branch October 22, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant