Skip to content

Implement Stream for EventStream#309

Merged
phil-opp merged 1 commit into
mainfrom
stream-impl
Jul 18, 2023
Merged

Implement Stream for EventStream#309
phil-opp merged 1 commit into
mainfrom
stream-impl

Conversation

@phil-opp
Copy link
Copy Markdown
Collaborator

The Stream trait is the asynchronous equivalent of iterators. By implementing it, we allow asynchronous nodes to use the various combinator methods instead of just the recv_async method.

To implement the trait, we convert the flume::Receiver into a async stream by using into_stream directly when the EventStream is constructed. I also tried keeping the flume::Receiver and only using Receiver::stream to get a temporary stream instance when needed, but this doesn't work because it does not keep the waker around (and thus never wakes it).

@phil-opp phil-opp merged commit ada2cd2 into main Jul 18, 2023
@phil-opp phil-opp deleted the stream-impl branch July 18, 2023 10:04
@haixuanTao haixuanTao mentioned this pull request Jul 18, 2023
heyong4725 added a commit that referenced this pull request Apr 17, 2026
… + #314 opened)

Verification on 2026-04-17 showed the D-7c premise in the plan doc
was broken:

- Upstream PR #1378 (the purported source for cherry-picking) is
  still OPEN, mergeable=false, Copilot-authored, 3,000 lines.
- Upstream main doesn't use zenoh SHM at all. It's TCP-control +
  shared_memory_extended-data per commit 01995ad (2026-03-18)
  which *removed* the shmem control channel entirely.
- Fork's shmem control channel is disabled-by-default (verified:
  LocalCommunicationConfig has #[default] Tcp). Applying Option D
  (upstream's cleanup equivalent) is safe but a real refactor.

Per owner direction: multiple v1.0.0-rc.N tags during Phase 5b will
progressively land architectural changes, with independent dogfood
between each. 1.0 GA ships with both D and zenoh SHM.

Plan doc changes:

- §1 Status line updated to reflect Phases 0/1/3 landed, 3b deferred
  to RC-window iteration. Release flow line now names rc.2 = D, rc.3
  = zenoh SHM.
- §5 Phase 3b section rewritten as a deferred placeholder. No code
  work happens in Phase 3b. Landing sequence (rc.1, rc.2, rc.3, GA)
  documented inline.
- §18 changelog entry for the rescope.

Tracking:
- #309 closed with full rationale.
- #313 opened for rc.2 Option D.
- #314 opened for rc.3 zenoh SHM port.
- Both linked as sub-issues of #292 (Phase 5b tracker).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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