Skip to content

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.
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
Member

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.

4 participants