Skip to content

feat: bounded channel blocking send for synchronous producers #170

Closed

Description

@zackees

Consumer

FastLED output-reader OS threads still call Tokio bounded Sender::blocking_send. Async send/try_send exist in async_engine, but no synchronous producer adapter. This prevents migrating the remaining command channels. Coordinated with FastLED/cli#239.

Contract

Add Sender::blocking_send and a facade-owned error retaining the unsent value. Preserve the existing bounded queue and wait for capacity; do not create a runtime, worker thread, polling loop, or unbounded queue. Receiver close/drop must wake blocked senders. Calls in an entered async runtime must return an explicit context error, not panic or block its worker. The blocking operation has no independent timer; consumers must close/drop their receiving endpoint during cancellation, as FastLED already does.

Validation

RED -> GREEN tests for no-runtime synchronous sending, capacity backpressure, ordered delivery, receiver close/drop waking blocked producers with original value, and async-context rejection with no enqueue. Keep implementation types private and default feature graph unchanged. Migrate FastLED bounded channel types only after the facade tests pass; retain product cancellation/containment tests.

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 6589fc3, with tests/async_blocking_channel.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