Skip to content

Update buffer operator terminal event handling - #2474

Open
shariarriday wants to merge 1 commit into
mainfrom
topic/shariarriday/buffer-op-terminal-events
Open

shariarriday wants to merge 1 commit into
mainfrom
topic/shariarriday/buffer-op-terminal-events

Conversation

@shariarriday

Copy link
Copy Markdown
Member

Relates #2471

This PR slightly reworks how buffer handles demand. Buffer does not request any value from source until the observer provides demand. Previously, buffer operator requested from source irrespective of demand from observer. Changing this behavior also resolves terminal event handling issue for this operator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates buffer backpressure and terminal-event handling so upstream reads follow downstream demand.

Changes:

  • Tracks in-flight items and limits upstream requests.
  • Defers terminal events when buffered items lack demand.
  • Adds documentation and extensive behavior tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
manual/core/DataFlows.rst Documents demand and terminal semantics.
libcaf_core/caf/flow/op/buffer.hpp Implements demand-aware pulling and terminal disposal.
libcaf_core/caf/flow/op/buffer.test.cpp Tests demand, terminal, disposal, and interval behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread libcaf_core/caf/flow/op/buffer.hpp Outdated
Comment thread manual/core/DataFlows.rst Outdated
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.20%. Comparing base (852955c) to head (c9ef450).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
libcaf_core/caf/flow/op/buffer.hpp 81.48% 1 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2474      +/-   ##
==========================================
+ Coverage   72.98%   73.20%   +0.21%     
==========================================
  Files         652      656       +4     
  Lines       31341    31433      +92     
  Branches     3444     3446       +2     
==========================================
+ Hits        22875    23011     +136     
+ Misses       6517     6463      -54     
- Partials     1949     1959      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shariarriday
shariarriday force-pushed the topic/shariarriday/buffer-op-terminal-events branch from ddc6397 to 51de204 Compare August 29, 2026 17:15
@shariarriday
shariarriday requested a balanced review from Copilot August 29, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread libcaf_core/caf/flow/op/buffer.hpp Outdated
@shariarriday
shariarriday force-pushed the topic/shariarriday/buffer-op-terminal-events branch from 51de204 to c9ef450 Compare August 30, 2026 10:11
@shariarriday
shariarriday marked this pull request as ready for review August 30, 2026 11:22
@shariarriday
shariarriday requested a review from Neverlord August 30, 2026 11:22
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.

2 participants