Skip to content

relay: wrap consumer in CrossExecFilter inside PublisherCrossExecFilter#352

Merged
afrind merged 1 commit into
mainfrom
feat/moar-cross-exec
May 29, 2026
Merged

relay: wrap consumer in CrossExecFilter inside PublisherCrossExecFilter#352
afrind merged 1 commit into
mainfrom
feat/moar-cross-exec

Conversation

@afrind
Copy link
Copy Markdown
Contributor

@afrind afrind commented May 28, 2026

subscribe() and fetch() now capture the caller's executor and wrap the consumer before dispatching to targetExec_, so upstream data is delivered back on the caller's executor without call-site boilerplate. On fetch error, inner_ never stored the consumer so no lambdas are in-flight; deactivate() breaks the selfGuard_ cycle to prevent a leak.

Test: FetchErrorDoesNotCallEndOfFetch asserts endOfFetch is not called on error; FetchReturnsSuccess is updated to run on an EventBase so the captured callerExec stays alive for the endOfFetch drain.


This change is Reviewable

subscribe() and fetch() now capture the caller's executor and wrap the
consumer before dispatching to targetExec_, so upstream data is
delivered back on the caller's executor without call-site boilerplate.
On fetch error, inner_ never stored the consumer so no lambdas are
in-flight; deactivate() breaks the selfGuard_ cycle to prevent a leak.

Test: FetchErrorDoesNotCallEndOfFetch asserts endOfFetch is not called
on error; FetchReturnsSuccess is updated to run on an EventBase so the
captured callerExec stays alive for the endOfFetch drain.
Copy link
Copy Markdown
Contributor

@gmarzot gmarzot left a comment

Choose a reason for hiding this comment

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

@gmarzot reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on akash-a-n, michalhosna, mondain, Oxyd, peterchave, suhasHere, and TimEvens).

@afrind afrind merged commit 2e7d6c0 into main May 29, 2026
16 checks passed
@afrind afrind deleted the feat/moar-cross-exec branch May 29, 2026 13:20
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