apple / apple/swift-async-algorithms
Send and receive only channels
- Dominant language
- Swift
- Stars
- 3.7k
- Forks
- 226
- Avg merge
- 10d 3h
- Merged PRs (30d)
- 1
Description
An important ability when passing around channels is to limit sending/receiving by passing a send-only or a receive-only channel. Right now, it is possible to erase receiving, since `AsyncChannel` is just an `AsyncSequence`. However, there's currently no mechanism to create a send-only version of a channel. The simplest solution I think is to create a wrapper type called `SendingChannel` or something. I think this is a good reason to rename `AsyncChannel` to just `Channel` (#47). Otherwise we would have `SendingAsyncChannel`, which is not too bad, but I really think the `Async` part doesn't help us much.
Contributor guide
Research direction
Start by reviewing the existing AsyncChannel API and the rename discussion in issue #47; no source file or test is identified here. Done means an agreed public design for send-only and receive-only channel views, including settled naming and behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100