Skip to content

Stream write result - #6282

Open
vietj wants to merge 2 commits into
masterfrom
message-write
Open

Stream write result#6282
vietj wants to merge 2 commits into
masterfrom
message-write

Conversation

@vietj

@vietj vietj commented Aug 4, 2026

Copy link
Copy Markdown
Member

No description provided.

@vietj vietj added this to the 5.2.0 milestone Aug 4, 2026
@vietj vietj self-assigned this Aug 4, 2026
@vietj vietj changed the title Unify message write and promise in a single class. Stream write result Aug 4, 2026
@vietj
vietj force-pushed the message-write branch 2 times, most recently from 3bb626e to b4349d6 Compare August 8, 2026 13:50
vietj added 2 commits August 12, 2026 15:43
Motivation:

An HTTP write operation requires currently a MessageWrite implementation along with a Promise to report the write result.

We can consolidate both in a single class to save allocations.

Changes:

Introduce a WritePromise object that extends PromiseImpl and implements MessageWrite.

Upon an HTTP write operation, that is passed to the channel and used as return of the write operation.
Motivation:

The stream writability API requires a poll after write (writeQueueFull) which can lead to a data race.

A stream write could provide the writability as a result of the write operation, improving the implementation of writability poll.

Changes:

Introduce an internal WriteResult future, aimed to eventually replace stream writeQueueFull.

This API is provided currently by HTTP server writes.
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