-
Notifications
You must be signed in to change notification settings - Fork 964
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
swarm/src/behaviour: Remove Send bound from NetworkBehaviour #2535
Conversation
I am considering this a non-breaking change, thus the patch version bump only. Please comment in case you think otherwise. |
Technically it is breaking. People could rely on the implicit Send bound if they write code that it is abstract over NetworkBehaviour and sent across thread boundaries. I think that can fairly easily happen if someone builds a generic piece of code for spawning a Swarm into a task pool as we can see from the tests. I think publishing it as breaking change would be better. I don't know if any library code exists that does depend on this but if it does, having things break in a dependency is a pretty shitty experience. |
agree with @thomaseizinger , it will likely require some folks to change their trait bounds if they are generic over it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dignifiedquire for the find.
…2535) The bound is no longer needed across the libp2p-XXX crates. Co-authored-by: Max Inden <mail@max-inden.de>
Needs confirmation this is okay design wise, but asfaict this is not actuallly required for the core of libp2p to work.
cc @mxinden