-
Notifications
You must be signed in to change notification settings - Fork 84
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
Plans/roadmap #3
Comments
Hi. I want add async but a safe implementation can be complicated. More info |
Ok. I see that you recently removed an async implementation. What didn't you like about it? |
|
It looks like async destructors are on the Rust team's radar which would definitely help. |
Why was this dropped? This is purely for usb async transfer, nothing to do with rust async. Form what I've learned the purpose of this is to enable libusb to have multiple packets qued up so that when one packet transfer is completed, the next can begin in the same frame. So when one frame takes 1ms regardless of what you do, this libusb specific async transfer will be extremely handy. It doesn't need to have rust async, it's perfectly fine to sync wait on this as libusb is still doing an async transfer. Then when someone else does want to use rust async, they can wrap it. |
It's droped because it's not safe wrapper. https://www.reddit.com/r/rust/comments/cadbkm/what_is_the_current_status_of_async_usb_in_rust/et8h96y/ |
I understand now that I tried using it 🤣. Very sorry if I've come off as pushy, I've spent a few weeks on this project now. |
In absence of a safe solution asynchronous I suppose that's the sort of solution which could be developed in a 3rd party crate, but it seems like it'd be nice to have a common solution to this problem. (also small suggestion: perhaps rename this issue to something like "Async support" since it seems like that's all that's being discussed here) |
If I understood the old implementation the asynchronous drop is not a problem since It's not a perfect solution and it adds a bit of performance overhead since each |
@SnowyCoder Yes it's might work. Also we can look at ringbahn. And take some ideas from them. I do not promise that I will implement it quickly, but I think to take a look. Also I will gladly accept PR for this |
Hi, it's nice to see someone having a go at a Rust-y version of the new libusb API :)
Do you have particular goals or features that you want to add? I wouldn't mind helping with the asynchronous API if that's something you plan to do (although I've never done something like that before, so I don't know how much I can contribute).
The text was updated successfully, but these errors were encountered: