Skip to content

Conversation

@22aronl
Copy link
Contributor

@22aronl 22aronl commented Apr 30, 2025

Networking Fixes(hexated) & USB HS fixes (22aaronl)

@22aronl 22aronl force-pushed the usb-hardware-fixes-1.3 branch from 6a61a35 to a3561a5 Compare May 1, 2025 23:56
@22aronl 22aronl requested review from ameyer1024 and hexatedjuice May 1, 2025 23:56
@22aronl 22aronl marked this pull request as ready for review May 1, 2025 23:57
Comment on lines +243 to +249
impl<const N: usize, T> Clone for Sender<N, T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
Copy link
Collaborator

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)

@ameyer1024 ameyer1024 force-pushed the usb-hardware-fixes-1.3 branch from 6af2172 to 8b50a42 Compare May 2, 2025 01:06
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