Skip to content

Deliver envelopes left in the inbound buffer before reading again - #203

Merged
resetius merged 2 commits into
masterfrom
actors-inbound-yield
Nov 11, 2026
Merged

resetius merged 2 commits into
masterfrom
actors-inbound-yield

Conversation

@resetius

Copy link
Copy Markdown
Owner

Deliver envelopes left in the inbound buffer before reading again

InboundConnection stops a batch after MaxBytesBeforeYield bytes and yields.
On the next turn it read from the socket first whenever the buffer was below
InflightBytes, even with complete envelopes still buffered. If the peer had
nothing more to send, those envelopes waited forever: a large payload followed
by a small message in the same read lost the small one. The connection now
reads again only after it has popped every complete envelope.

InboundConnection stops a batch after MaxBytesBeforeYield bytes and yields.
On the next turn it read from the socket first whenever the buffer was below
InflightBytes, even with complete envelopes still buffered. If the peer had
nothing more to send, those envelopes waited forever: a large payload followed
by a small message in the same read lost the small one. The connection now
reads again only after it has popped every complete envelope.
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Unit Test Results (MacOS)

246 tests  +1   246 ✅ +1   26s ⏱️ ±0s
  4 suites ±0     0 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 6710473. ± Comparison against base commit 266a139.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Unit Test Results (Linux)

325 tests  +1   325 ✅ +1   23s ⏱️ ±0s
  4 suites ±0     0 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 6710473. ± Comparison against base commit 266a139.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Unit Test Results (Windows)

167 tests  +1   167 ✅ +1   43s ⏱️ ±0s
  4 suites ±0     0 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 6710473. ± Comparison against base commit 266a139.

♻️ This comment has been updated with latest results.

@resetius
resetius merged commit 44544ec into master Nov 11, 2026
7 checks passed
@resetius
resetius deleted the actors-inbound-yield branch November 11, 2026 19:40
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