Skip to content

Implement rendezvous mpsc channel #57

Closed as not planned
Closed as not planned

Description

@tisonkun

Another follow-up idea is to support rendezvous channel (buffer = 0).

The underneath implementation would be greatly different, while the interface can remain the same.

To keep code maintenable, if we implement a rendezvous channel, I'd keep them in a separate mod.

Originally posted by @tisonkun in #56 (comment)

Activity

  1. tisonkun commented on Jul 8, 2025

    @tisonkun
    MemberAuthor

    After a closer look, in Async Rust, this is somehow the same as buffer = 1.

    Take futures-channel's impl as an example:

    let (tx, mut rx) = ...;
    tx.try_send(1);
    rx.try_recv().unwarp(); // Some(1)

    This is because, if the whole program consist by try_send and recv, it should be able to send/recv. But in Async Rust, even if the send puts the value to an intermediate buffer, and wakes up the recv task, the recv task may not be scheduled or run.

    So, I'd suggest people who wants to use a rendezvous mpsc channel just create a bounded channel with buffer = 1. The difference is tiny and can be ignored.

  2. tisonkun commented on Aug 21, 2026

    @tisonkun
    MemberAuthor

    Superseded by #167. The new design treats rendezvous as an explicit handoff contract: send completes only after a receive operation accepts the value, which is distinct from enqueueing into a capacity-one buffer. Keeping this issue closed in favor of the broader design tracker.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions