docs(design): async-compatible channel abstraction for transfer pipeline#3647
Merged
Merged
Conversation
Design note for #1591. Proposes a TransferChannel trait that exposes both sync and async send/recv surfaces, with flume as the recommended backing for sync-async bridge sites and crossbeam retained for the pure-sync hot paths. Documents the five migration sites, backpressure and fairness semantics, cancellation footguns, and follow-up work. Wire-compat impact: zero. Channels are internal coordination only.
af8eb65 to
ebe7878
Compare
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…ine (#3647) Design note for #1591. Proposes a TransferChannel trait that exposes both sync and async send/recv surfaces, with flume as the recommended backing for sync-async bridge sites and crossbeam retained for the pure-sync hot paths. Documents the five migration sites, backpressure and fairness semantics, cancellation footguns, and follow-up work. Wire-compat impact: zero. Channels are internal coordination only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design note for #1591 covering an async-compatible channel abstraction for the transfer pipeline. Proposes a thin
TransferChanneltrait (sync + async send/recv on the same channel) and a default implementation choice (flume for sync-async bridges, crossbeam stays in pure-sync hot paths).Key sections
crates/engine/src/concurrent_delta/work_queue/bounded.rs,crates/transfer/src/pipeline/spsc.rs,crates/transfer/src/pipeline/async_dispatch.rs, andcrates/daemon/src/daemon/async_session/listener.rs.Sender/Receivertypes, synctry_send/send_blocking/recv_blockingplus asyncsend_async/recv_async.Wire-compat invariants
Zero impact. Channels are internal coordination only - no protocol bytes, no capability negotiation, no multiplex frame changes.
Test plan
bounded.rs:8,89-104,listener.rs:25,216-249,async_dispatch.rs:10,consumer.rs:47,Cargo.toml:188,199-200.