Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/muxing: Drop Sync requirement for StreamMuxer on StreamMuxerBox #2775

Merged
merged 3 commits into from
Jul 27, 2022

Conversation

thomaseizinger
Copy link
Contributor

Description

StreamMuxerBox is never shared across threads but owned by a single
connection. Restricting it to be Sync unnecessarily limits the design
space around the StreamMuxer trait and its implementations.

Links to any relevant issues

Required for #2765.

Open Questions

Change checklist

  • I have performed a self-review of my own code
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

…rBox`

`StreamMuxerBox` is never shared across threads but owned by a single
connection. Restricting it to be `Sync` unnecessarily limits the design
space around the `StreamMuxer` trait and its implementations.
core/CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines 301 to 304
T::Error: Send + Sync,
M: StreamMuxer + Send + Sync + 'static,
M: StreamMuxer + Send + 'static,
M::Substream: Send + Unpin + 'static,
M::Error: Send + Sync + 'static,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also drop the other Sync requirements here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. I'd say we do it in a different PR though :)

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My favorite trait bound to be dropped. 🙏

@mxinden mxinden merged commit 56c492c into master Jul 27, 2022
@thomaseizinger thomaseizinger deleted the remove-muxer-sync-bounds branch August 2, 2022 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants