Implement "rendez-vous" mode
- Dominant language
- Rust
- Stars
- 846
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
(This is related to #7, however, that treats a buffer size of 0 as inappropriate value, here it's to discuss its usefulness).
The stdlib `mpsc` module has a `sync_channel(bound: usize)`](https://doc.rust-lang.org/std/sync/mpsc/fn.sync_channel.html) method.
The case where `bound == 0` is actually made explicit:
> Note that a buffer size of 0 is valid, in which case this becomes "rendezvous channel" where each send will not return until a recv is paired with it.
I think that this should not be discarded as ["not useful"](https://github.com/jonhoo/bus/issues/7#issuecomment-247242214). The reason is that, with a buffer size of 0, this library can be used effectively (for example) to sync threads. By waiting for all receivers to read, a sender can ensure that all the receivers are in the expected state. mpsc can do that, but it's significantly slower.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing channel implementation and issue #7, then compare the requested behavior with Rust’s std::sync::mpsc::sync_channel(0). Determine how rendezvous sends should coordinate with receivers and how the behavior should be tested. Done means the mode supports zero buffering and its synchronization semantics are covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100