-
Notifications
You must be signed in to change notification settings - Fork 0
Usb Hardware Fixes For High Speed & Networking #81
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
base: main
Are you sure you want to change the base?
Conversation
6a61a35 to
a3561a5
Compare
| impl<const N: usize, T> Clone for Sender<N, T> { | ||
| fn clone(&self) -> Self { | ||
| Self { | ||
| inner: self.inner.clone(), | ||
| } | ||
| } | ||
| } |
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.
This is unsound -- the channel is internally SPSC, so making additional Senders or Receivers will corrupt data. The simplest fix is to use a lock (probably a binary semaphore, since IIRC we don't have an async/await lock api) to make a MPMC version (as a different type? so we don't get perf overhead on the SPSC use cases)
6af2172 to
8b50a42
Compare
Networking Fixes(hexated) & USB HS fixes (22aaronl)