Suggestion: Use `oneshot::channel` instead of `async_std::channel`
Open
- Dominant language
- Rust
- Stars
- 209
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
There are a couple of places where a one-time channel is needed:
- Upgrading a connection
- Sending/receiving trailers
Currently these wrap the channel from async_std, but it would simplify things if they wrapped `oneshot::channel` from futures (or other similar channel) instead, as that channel offers the following benefits:
- Simpler implementation and less synchronization, since only two tasks are involved.
- Send function does not need to be async.
Since this is a breaking change to the signature of `send`, it should be done for the next major release.
Contributor guide
Assessment
This issue has not been assessed yet.