-
Notifications
You must be signed in to change notification settings - Fork 55
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
Async IO #76
Comments
Ok, so I tried to put the file in non-blocking mode using But then, when I use After debugging, I realized that it's I didn't find anything useful on non-blocking I2C operations on Linux. So I'm not sure Linux support these. |
After all, only dumb So I guess the only way to have async is to spawn a tread to handle blocking I2C IO. Unless someone has a better idea? |
edit: looks like you're right, ioctls always block so it'd have to be a separate thread with channels |
Do you think it's a good idea to provide async using threads in this crate. Or it should be up to the user of this crate to implement it? |
hmm i think it'd be good to provide, though i wonder whether it would be better in linux-embedded-hal with the other it will have to be runtime specific so probably behind a |
Well, actually, I'm working on my own linux-embedded-hal-async. But if you want to merge it inside linux-embedded-hal, I would be happy to. Though, I'm currently focusing on async-std only. |
Hi,
Is it possible to have async functions binding in the same way that
gpio_cdev::AsyncLineEventHandle
does?Is it as simple as opening the device file in non-blocking mode and warping the raw file descriptor in a
tokio::io::unix::AsyncFd
?It would be very helpful to have an async API.
Thanks
The text was updated successfully, but these errors were encountered: