You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the transmitting of data with NUSB generally awaits the transfer to be complete. We could instead just submit, and then return, allowing multiple submissions to be sent nose-to-tail.
I tried this diff, and it didn't seem to help as much as I would have hoped, but we might need #69 to realize the improvements. One downside of this is that if there is an error, it will show up at the "wrong time", though it's likely that the input worker will notice a disconnect first anyway.
impl NusbWireTx {
async fn send_inner(&mut self, data: Vec<u8>) -> Result<(), NusbWireTxError> {
- self.boq.submit(data);-- let send_res = self.boq.next_complete().await;- if let Err(e) = send_res.status {- tracing::error!("Output Queue Error: {e:?}");- return Err(e.into());+ while self.boq.pending() != 0 {+ let send_res = self.boq.next_complete().await;+ if let Err(e) = send_res.status {+ tracing::error!("Output Queue Error: {e:?}");+ return Err(e.into());+ }
}
+ self.boq.submit(data);
Ok(())
}
}
The text was updated successfully, but these errors were encountered:
Ah, this isn't good either, we still wait for pending frames to complete. That explains the lack of perf difference. We might want to select on completion and maybe another intermediate channel? The worker tasks being outside of the interfaces may have been the wrong place to draw the interface line.
Right now, the transmitting of data with NUSB generally awaits the transfer to be complete. We could instead just submit, and then return, allowing multiple submissions to be sent nose-to-tail.
I tried this diff, and it didn't seem to help as much as I would have hoped, but we might need #69 to realize the improvements. One downside of this is that if there is an error, it will show up at the "wrong time", though it's likely that the input worker will notice a disconnect first anyway.
The text was updated successfully, but these errors were encountered: