Skip to content

feat(async): bounded broadcast delivery and optional stream interoperability #174

Closed

Description

@zackees

Coordinated with FastLED/cli#239. FastLED still uses direct Tokio broadcast senders/receivers for build events plus tokio-stream to feed its SSE endpoint.

Add facade-owned bounded broadcast sender/receiver types with synchronous send/try-receive, async cancellation-safe receive, cloneable senders, subscription to future messages, explicit lag counts and closure. Require a positive power-of-two capacity at most 1048576 entries so the configured capacity is exact; callers own payload-size policy. Sending with no subscribers must return the original value.

Provide an optional event-stream interoperability feature: a facade-owned stream adapter accepts a synchronous mapping/filter function over delivery results, implements the ecosystem futures-core Stream trait, and privately uses tokio-stream. Do not re-export backend types/traits. No spawned pump task or second queue; pull-based polling and lag remain explicit. Default feature graph must remain unchanged.

RED-to-GREEN tests upstream: ordering/fanout/subscription timing, exact capacity/lag/recovery, no-subscriber value retention, closure/drain/cancellation, stream mapping and closure. FastLED keeps JSON/SSE formatting and explicit lag-filter policy. Remove its direct tokio-stream dependency only after adoption checks pass.

Activity

  1. zackees commented on Sep 16, 2026

    @zackees
    CollaboratorAuthor

    Complete and adopted; closing with the evidence rather than leaving it open.

    kernal-api — landed in eb619a4, with tests/async_broadcast.rs. Verified present on main rather than inferred from the commit message alone.

    FastLED — the kernel async surface the application builds on.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions